命令
这一页只列出用户直接执行的命令。首次 setup 请从 安装 开始。
- 首次 setup:
agent-note init - 从仓库移除 Agent Note:
agent-note deinit - 检查状态:
agent-note status - 查看最近活动:
agent-note log - 显示 commit 数据:
agent-note show - 查看某一行为什么改变:
agent-note why
agent-note init
Section titled “agent-note init”在仓库中设置 Agent Note。
npx agent-note init --agent claude| 参数 | 说明 |
|---|---|
--agent <name...> | 选择一个或多个 agent adapters: claude, codex, cursor or gemini |
--dashboard | 同时创建共享 Dashboard workflow |
--no-hooks | 跳过 agent hooks 配置 |
--no-git-hooks | 跳过 Git Hooks 安装 |
--no-action | 跳过 workflow 创建 |
--no-notes | 跳过 notes auto-fetch 配置 |
--hooks | 仅安装 agent hooks |
--action | 仅创建 workflow |
agent-note deinit
Section titled “agent-note deinit”移除一个或多个 Agent 的 hooks 和 config。
npx agent-note deinit --agent claude| Flag | 说明 |
|---|---|
--agent <name...> | claude, codex, cursor or gemini |
--remove-workflow | 同时删除 PR Report 和 Dashboard workflow |
--keep-notes | 保留 notes auto-fetch 配置 |
agent-note status
Section titled “agent-note status”显示追踪状态。
npx agent-note statusagent-note v1.x.x
agent: active (cursor)capture: cursor(prompt, response, edits, shell)git: active (prepare-commit-msg, post-commit, pre-push)commit: tracked via git hookssession: a1b2c3d4…agent: cursorlinked: 3/20 recent commitsagent-note log
Section titled “agent-note log”列出最近提交和 AI Ratio。
npx agent-note lognpx agent-note log 20ce941f7 feat: add auth [a1b2c3d4… | 🤖60% | 2p]326a568 test: add tests [a1b2c3d4… | 🤖100% | 1p]ba091be fix: update depsagent-note show
Section titled “agent-note show”显示某个 commit 的 AI Session。
npx agent-note shownpx agent-note show abc1234commit: ce941f7 feat: add JWT auth middlewaresession: a1b2c3d4-5678-4abc-8def-111122223333
ai: 60% (45/75 lines) [█████░░░]model: claude-sonnet-4-20250514agent: claudefiles: 3 changed, 2 by AI
src/middleware/auth.ts 🤖 src/types/token.ts 🤖 CHANGELOG.md 👤
prompts: 2
1. Implement JWT auth middleware with refresh token rotation 2. Add tests for expired token and invalid signatureagent-note why
Section titled “agent-note why”显示某一行背后的 Agent Note context。
npx agent-note why src/middleware/auth.ts:42npx agent-note why src/middleware/auth.ts:42-55npx agent-note why src/middleware/auth.ts:42:7npx agent-note why src/middleware/auth.ts#L42npx agent-note why src/middleware/auth.ts#L42-L55npx agent-note why src/middleware/auth.ts#L42C7npx agent-note why @src/middleware/auth.ts#L42npx agent-note why https://github.com/owner/repo/blob/main/src/middleware/auth.ts#L42npx agent-note why file:///workspace/repo/src/middleware/auth.ts#L42npx agent-note why vscode://file/workspace/repo/src/middleware/auth.ts:42:7AI Agent Skill
Section titled “AI Agent Skill”安装 Agent Note Skill 后,可以用自然语言请求这些任务。
gh skill install wasabeef/AgentNote agent-note --agent codex --scope user对于 gh skill install,请根据 Agent 选择对应的 identifier: codex, claude-code, cursor or gemini-cli。