跳到內容

命令

這一頁只列出使用者直接執行的命令。首次設定請從 安裝 開始。

  • 首次設定: agent-note init
  • 從儲存庫移除 Agent Note: agent-note deinit
  • 檢查狀態: agent-note status
  • 查看最近活動: agent-note log
  • 顯示 Commit 資訊: agent-note show
  • 查看某一行為什麼改變: agent-note why

在儲存庫中設定 Agent Note。

Terminal window
npx agent-note init --agent claude
參數說明
--agent <name...>選擇一個或多個 Agent 介接器: 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 的 hooks 和設定。

Terminal window
npx agent-note deinit --agent claude
參數說明
--agent <name...>claude, codex, cursor or gemini
--remove-workflow同時刪除 PR Report 和 Dashboard Workflow
--keep-notes保留 notes auto-fetch 設定

顯示追蹤狀態。

Terminal window
npx agent-note status
agent-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 hooks
session: a1b2c3d4…
agent: cursor
linked: 3/20 recent commits

列出最近提交和 AI Ratio。

Terminal window
npx agent-note log
npx agent-note log 20
ce941f7 feat: add auth [a1b2c3d4… | 🤖60% | 2p]
326a568 test: add tests [a1b2c3d4… | 🤖100% | 1p]
ba091be fix: update deps

顯示某個 commit 的 AI Session。

Terminal window
npx agent-note show
npx agent-note show abc1234
commit: ce941f7 feat: add JWT auth middleware
session: a1b2c3d4-5678-4abc-8def-111122223333
ai: 60% (45/75 lines) [█████░░░]
model: claude-sonnet-4-20250514
agent: claude
files: 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 signature

顯示某一行背後的 Agent Note 脈絡。

Terminal window
npx agent-note why src/middleware/auth.ts:42
npx agent-note why src/middleware/auth.ts:42-55
npx agent-note why src/middleware/auth.ts:42:7
npx agent-note why src/middleware/auth.ts#L42
npx agent-note why src/middleware/auth.ts#L42-L55
npx agent-note why src/middleware/auth.ts#L42C7
npx agent-note why @src/middleware/auth.ts#L42
npx agent-note why https://github.com/owner/repo/blob/main/src/middleware/auth.ts#L42
npx agent-note why file:///workspace/repo/src/middleware/auth.ts#L42
npx agent-note why vscode://file/workspace/repo/src/middleware/auth.ts:42:7

安裝 Agent Note Skill 後,可以用自然語言請求這些任務。

Terminal window
gh skill install wasabeef/AgentNote agent-note --agent codex --scope user

對於 gh skill install,請依照 Agent 選擇對應的識別碼: codex, claude-code, cursor or gemini-cli