run
GitHub本地启动LeafWiki的Go后端与Vite前端,用于手动端到端验证前后端变更。
Trigger Scenarios
Install
npx skills add perber/leafwiki --skill run -g -y
SKILL.md
Frontmatter
{
"name": "run",
"description": "Launch LeafWiki locally (Go backend + Vite frontend dev server) to manually verify a change in the browser. Use whenever a frontend or backend change needs to be exercised end-to-end instead of just type-checked or unit-tested."
}
Running LeafWiki locally
LeafWiki needs two processes running side by side: the Go backend (API + serves data)
and the Vite dev server (frontend, proxies /api, /assets, /branding to the backend).
1. Backend
cd cmd/leafwiki
go run . --jwt-secret=dev --admin-password=dev --public-access=true --allow-insecure=true
Runs on http://localhost:8080. Admin login: username admin, password dev.
--public-access=true lets you view pages without logging in; use the admin login for
anything that touches the tree, settings, or editor.
2. Frontend
cd ui/leafwiki-ui
npm install # first time only
npm run dev
Runs on http://localhost:5173 — open this URL, not :8080, during development.
Notes
- Run both in the background (e.g. two
run_in_backgroundBash calls) and pollhttp://localhost:5173/http://localhost:8080readiness before navigating. - Click-throughs and screenshots belong in a subagent that reports back a short text verdict. Every image read in the main session stays in its context and is paid for again on every later turn.
- Data is stored on disk under the backend's working directory (
cmd/leafwiki) by default — starting fresh creates an empty wiki with just the root page. - Before committing, run
npm run formatinui/leafwiki-ui(and ine2e/if e2e tests changed).
Version History
- 8c5843f Current 2026-10-19 00:23


