Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ base64 = "0.22"
libc = "0.2"
tempfile = "3"
uuid = { version = "1", features = ["v4"] }
dialoguer = { version = "0.12.0", default-features = false }

[dev-dependencies]
assert_cmd = "2"
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ agentdiff consolidate --branch feature/my-branch --push
# Write CI workflows to .github/workflows/ (run once per repo)
agentdiff install-ci

# Configure all supported agents directly, including Gemini/Antigravity
agentdiff configure --all

# Configure only selected agents without the interactive picker
agentdiff configure --agents cursor,codex,opencode

# Skip specific agents during configure
agentdiff configure --no-copilot --no-antigravity

Expand Down Expand Up @@ -203,7 +209,7 @@ agentdiff status --remote --no-fetch # fast: show refs + SHAs only, skip trace
| **Codex CLI** | `notify` hook (`~/.codex/config.toml`) | Task-level file changes |
| **Gemini / Antigravity** | `BeforeTool`/`AfterTool` hooks (`~/.gemini/settings.json`) | `write_file`, `replace` |

Agent hooks for Claude, Cursor, Codex, Windsurf, OpenCode, and Gemini are all installed **globally once** via `agentdiff configure`. However, capture only fires in repos where `agentdiff init` has been run — the `.git/agentdiff/` directory must exist for any data to be written.
Agent hooks are installed **globally once** via `agentdiff configure`. In an interactive terminal, AgentDiff detects available agent configs and lets you choose integrations with Space + Enter. By default it selects the main coding agents and leaves Gemini/Antigravity optional; use `agentdiff configure --all` to install every supported integration directly. Claude MCP setup is part of the Claude Code integration, so it only runs when Claude is selected; use `--no-mcp` to skip MCP while still configuring Claude. Capture only fires in repos where `agentdiff init` has been run — the `.git/agentdiff/` directory must exist for any data to be written.

---

Expand Down Expand Up @@ -376,7 +382,7 @@ agentdiff list --uncommitted

**1. `agentdiff configure` — one-time global setup**

Installs Python capture scripts to `~/.agentdiff/scripts/` and registers hooks with each agent:
Installs Python capture scripts to `~/.agentdiff/scripts/` and registers hooks with selected agents. In an interactive terminal, AgentDiff shows a Space/Enter multi-select picker; in scripts, use `--all` or `--agents cursor,codex` to avoid prompting. The Claude MCP server is registered only when Claude Code is selected.

- Claude Code → `~/.claude/settings.json` (PostToolUse)
- Cursor → `~/.cursor/hooks.json` (afterFileEdit, afterTabFileEdit)
Expand Down
8 changes: 8 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ pub struct StatusArgs {

#[derive(Args, Debug)]
pub struct ConfigureArgs {
/// Configure every supported agent without prompting
#[arg(long)]
pub all: bool,

/// Configure only these agents (comma-separated: claude-code,cursor,codex,windsurf,opencode,copilot,antigravity)
#[arg(long, value_delimiter = ',', value_name = "AGENTS")]
pub agents: Vec<String>,

/// Skip Claude Code hook setup
#[arg(long)]
pub no_claude: bool,
Expand Down
Loading
Loading