useagentbase
v0.7.0
Published
Capture your Claude Code session as Author Intent on every PR. Reviewers see Tried / Chose / Ruled-out callouts inline on the diff.
Maintainers
Readme
AgentBase CLI
Capture your Claude Code or Cursor session as Author Intent on every PR. Reviewers see Tried / Chose / Ruled-out callouts inline on the diff — the actual reasoning that produced the change, not your post-hoc PR description.
Install
npx useagentbase installBy default this installs hooks for both Claude Code and Cursor. You can scope it:
npx useagentbase install --claude
npx useagentbase install --cursor
npx useagentbase install --allThe installer:
- Opens your browser to sign in to AgentBase and mint an auth token
- Asks you to paste the token back (one-time, the CLI stores it at
~/.agentbase/config.json) - Writes the hook script to
~/.agentbase/hook.mjs - Registers:
- Claude Code hook in
~/.claude/settings.json - Cursor hook in
~/.cursor/hooks.json
- Claude Code hook in
- Validates that
ghis installed
That's it. Your next gh pr create or git push from Claude Code or Cursor will capture session context and post it to AgentBase. Pushes to existing PRs also re-capture, so reviewers see intent that reflects the latest commit — not just the PR's first push.
What gets captured
Whenever you run gh pr create or git push from inside a supported session, the hook reads:
- Claude transcript path when available, otherwise the latest Cursor transcript in
~/.cursor/projects/<project>/agent-transcripts/ - The repo, branch, and head SHA from your local
git - Nothing else
The transcript is uploaded to AgentBase over HTTPS. Server-side, it's scrubbed for high-confidence secret patterns before persistence:
- API keys (Anthropic, OpenAI, Google, Stripe)
- AWS access key IDs
- GitHub personal access tokens (
ghp_,gho_,ghu_,ghs_,ghr_) - Slack tokens (
xoxb-,xoxp-) - JWTs
- PEM-encoded private keys
- HTTP basic-auth credentials embedded in URLs
Generic password= patterns are intentionally NOT scrubbed to avoid false-positive redactions on legitimate discussion of secrets.
Non-blocking guarantee
The hook never delays or fails gh pr create. If AgentBase is unreachable, returns an error, or the hook script crashes, your PR opens normally. Hook failures log silently to ~/.agentbase/log for debugging — never to your terminal.
Privacy posture
- The full session JSONL is uploaded by default. Future versions will support summary-only mode.
- You can disable capture for a specific PR by including
[skip-intent]in the PR body or any commit message (coming in v0.2). - Server-side captures are rate-limited to 20/hour per user.
Uninstall
npx useagentbase uninstallRemoves the AgentBase hook entries from ~/.claude/settings.json and ~/.cursor/hooks.json (leaving other hooks intact), deletes ~/.agentbase/{config.json, hook.mjs, log}, and removes the ~/.agentbase/ directory if empty. Idempotent — re-running is a no-op.
Existing PRs and intent captures stored on the AgentBase server are unaffected by uninstall. To also wipe server-side state, contact support.
Development
This package lives in the AgentBase monorepo under cli/. To work on it:
git clone https://github.com/victorpolisetty/AgentBase.git
cd AgentBase
AGENTBASE_BASE_URL=http://localhost:3000 npm run agentbase:installLicense
MIT
