acp-cli
Headless CLI client for the Agent Client Protocol (ACP). Rust port of ACPX.
Talk to coding agents (Claude, Codex, Gemini, etc.) over a structured protocol instead of terminal scraping.
Install
Usage
# Simple prompt (uses claude by default)
# One-shot mode (no session persistence)
# JSON output for automation
# Quiet mode (final text only)
# Use a different agent
# Named sessions for parallel work
# Custom timeout
Supported Agents
| Agent | Command |
|---|---|
| claude | npx @zed-industries/claude-agent-acp |
| codex | npx @zed-industries/codex-acp |
| gemini | gemini --acp |
| copilot | copilot --acp --stdio |
| cursor | cursor-agent acp |
| goose | goose acp |
| kiro | kiro-cli acp |
| pi | npx pi-acp |
| openclaw | openclaw acp |
| opencode | npx opencode-ai acp |
| kimi | kimi acp |
| qwen | qwen --acp |
| droid | droid exec --output-format acp |
Unknown agent names are treated as raw commands.
Permission Modes
| Flag | Behavior |
|---|---|
--approve-all |
Auto-approve all tool calls |
--approve-reads |
Approve read-only tools, deny writes (default) |
--deny-all |
Deny all tool calls |
Output Formats
- text (default) — streaming text with tool status
- json — NDJSON, one event per line
- quiet — final text only
Config
Create ~/.acp-cli/config.json:
Session Management
Sessions auto-resume by matching (agent, git_root, name).
License
MIT