跳转到内容

安装

这一页是实际设置步骤。完成后,仓库可以在普通 git commit 中记录 Agent Note data,并在 GitHub 上发布 PR Report。

  1. 在仓库中运行 init

    Terminal window
    npx agent-note init --agent claude

    其他 agent:

    • Codex CLI: npx agent-note init --agent codex
    • Cursor: npx agent-note init --agent cursor
    • Gemini CLI: npx agent-note init --agent gemini
    • 多个 agent: npx agent-note init --agent claude cursor

    同时启用 Dashboard:

    Terminal window
    npx agent-note init --agent claude --dashboard
  2. 提交生成的文件。

    Terminal window
    git add .claude/settings.json .github/workflows/agentnote-pr-report.yml
    git commit -m "chore: enable agent-note"
    git push

    Codex CLI 会添加 .codex/config.toml.codex/hooks.json。Cursor 会添加 .cursor/hooks.json。Gemini CLI 会添加 .gemini/settings.json。使用 --dashboard 时,也要提交 .github/workflows/agentnote-dashboard.yml

  3. 像平常一样使用 agent 编码。 生成的 git hooks 安装后,普通 git commit 就够了。

git hooks 位于 .git/ 中,不会被 commit。每个开发者在 git clone 后都需要运行一次 init

Terminal window
git clone <repository-url>
cd <repository-dir>
npx agent-note init --agent claude
Terminal window
npx agent-note status
npx agent-note show

如果 PR Report 为空,或 prompt 看起来过短,请查看 Troubleshooting