run
GitHub用于本地启动LeafWiki(Go后端+Vite前端)以进行端到端手动验证。支持后台运行、健康检查及格式化,替代类型检查和单元测试。
触发场景
安装
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).
Start
make setup # first time, or after package-lock.json changed
make dev
make dev builds and starts the backend on http://localhost:8080 and Vite on
http://localhost:5173 — open :5173, not :8080, during development. Admin login: username
admin, password devpassword (the minimum is 8 characters). --public-access=true lets you
view pages without logging in; use the admin login for anything that touches the tree,
settings, or editor. Extra backend flags: make dev ARGS=--enable-revision=true. Ctrl-C, or
SIGTERM to the script, stops both.
Without make dev: go run . --jwt-secret=dev --admin-password=devpassword --public-access=true --allow-insecure=true in cmd/leafwiki, and npm run dev in
ui/leafwiki-ui.
Notes
- Run
make devin the background (arun_in_backgroundBash call) and pollhttp://localhost:5173/http://localhost:8080readiness before navigating. Stop it withpkill -TERM -f scripts/dev.sh: a background job ignores SIGINT, and the script's trap stops both servers on SIGTERM. - 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).
版本历史
-
714e036
当前 2026-11-02 16:55
统一使用make dev命令简化启动流程;修正开发环境管理员密码长度限制说明。
- 8c5843f 2026-10-19 00:23


