快速开始

只要装 Node 22.18 或更高版本,别的都不用装:不用构建,也没有依赖。

sh
git clone https://github.com/coo1white/yokotennode yokoten/bin/yokoten.ts install  # 每台电脑一次cd your-projectnode ~/.local/share/yokoten/bin/yokoten.ts init  # 每个项目一次

然后用 Claude Code 打开项目。它会告诉你走到了第几关,下一步该做哪一件事。

等 npm 版发布后,一条 npx yokoten 就能装好。

看看装好了没有

在项目里跑一下 doctor。它会列出整条路,标出下一步:

sh
node .yokoten/bin/yokoten.ts doctoryokoten 0.1.0, self-test okthe road: stage 1 of 5, safety net  1. safety net    done        rules    done        tool-hook    done        commit-check    done        runtime    next        tests: CI does not run the tests; add a step that runs `npm test` …  2. issues and pull requests    …

这里删减过,你看到的步骤会不一样。

想看守卫怎么拦,又不想真的执行什么?给它一个假的工具调用就行:

sh
echo '{"tool_name":"Bash","tool_input":{"command":"git push --tags"}}' | node .yokoten/bin/yokoten.ts hookyokoten: git push --tags pushes tags. Only the owner decides when to release. If the owner asked for this, they start the session with YOKOTEN_RELEASE_APPROVAL set.

什么都不会推送出去:hook 只是读一下这个调用。退出码 2 表示「拦下了」。

了解更多