@getdiff/acp
v0.1.0
Published
ACP agent wrapper — run GetDiff in any ACP-compatible editor
Readme
@getdiff/acp
ACP (Agent Control Protocol) wrapper for GetDiff. Run GetDiff as a coding agent in any ACP-compatible editor — Zed, JetBrains, Neovim, Emacs, VS Code — with one package.
What This Does
Wraps @getdiff/sdk as an ACP-compatible subprocess. Editors spawn it, send prompts over stdin, and receive streaming responses on stdout via JSON-RPC 2.0. The editor handles all UI (chat panel, diffs, terminal, approvals). This package handles the agent logic.
Quick Start
# Install globally
npm install -g @getdiff/acp
# Or run directly
npx @getdiff/acpNo API key needed — defaults to the free Diff hosted provider.
Editor Setup
Zed
GetDiff appears in Zed's agent picker once registered in the ACP registry. Select "GetDiff" and start chatting.
VS Code
Install the ACP extension, then configure it to use GetDiff:
{
"acp.agents": [{
"name": "GetDiff",
"command": "npx",
"args": ["@getdiff/acp"]
}]
}JetBrains / Neovim / Emacs
Any editor with ACP support can spawn getdiff-acp (or npx @getdiff/acp) as a subprocess.
Configuration
Config is read from ~/.getdiff/config.json:
{
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"apiKey": "sk-..."
}Environment variables override the config file:
| Variable | Description |
|----------|-------------|
| GETDIFF_PROVIDER | Provider name (diff, anthropic, openai, google, etc.) |
| GETDIFF_MODEL | Model identifier |
| GETDIFF_API_KEY | API key for the provider |
| GETDIFF_API_BASE_URL | Custom API base URL |
How It Works
Editor (Zed, VS Code, etc.) @getdiff/acp
│ │
├─── session/initialize ──────────────►│ negotiate capabilities
├─── session/new ─────────────────────►│ create session
├─── session/prompt ──────────────────►│ user message
│ │
│◄─── agent_message_chunk ────────────┤ streaming text
│◄─── agent_thought_chunk ────────────┤ thinking (if enabled)
│◄─── tool_call ─────────────────────┤ Read, Edit, Bash, etc.
│ │
├─── requestPermission ──────────────►│ editor shows approval UI
│◄─── permission result ─────────────┤
│ │
│◄─── tool_call_update ──────────────┤ tool result
│◄─── PromptResponse ───────────────┤ doneThe agent runs @getdiff/sdk's query() in-process (no CLI subprocess). SDK messages are translated to ACP notifications in real time.
Development
# From the monorepo root
npm install
# Build
cd acp && npm run build
# Type-check
npm run typecheck
# Run locally
node dist/index.jsLicense
Apache-2.0
