acpx

2026-05-14 · source · source ↗ · raw capture · wiki page

npm version npm downloads CI License: MIT

acpx is in alpha and the CLI/runtime interfaces are likely to change. Anything you build downstream of this might break until it stabilizes.

Your agents love acpx! They hate having to scrape characters from a PTY session.

acpx is a headless CLI client for the Agent Client Protocol (ACP), so AI agents and orchestrators can talk to coding agents over a structured protocol instead of PTY scraping.

One command surface for Pi, OpenClaw ACP, Codex, Claude, and other ACP-compatible agents. Built for agent-to-agent communication over the command line.

Key Features

Install

npm install -g acpx@latest

Or run without installing:

npx acpx@latest codex "fix the tests"

Session state lives in ~/.acpx/ either way.

Built-in Agents

Agent Wraps
pi Pi Coding Agent
openclaw OpenClaw ACP bridge
codex Codex CLI
claude Claude Code
gemini Gemini CLI
cursor Cursor CLI
copilot GitHub Copilot CLI
droid Factory Droid
iflow iFlow CLI
kilocode Kilocode
kimi Kimi CLI
kiro Kiro CLI
opencode OpenCode
qoder Qoder CLI
qwen Qwen Code
trae Trae CLI

Use --agent as an escape hatch for custom ACP servers.

Usage Examples

acpx codex sessions new                        # create a session
acpx codex 'fix the tests'                     # implicit prompt
acpx codex --no-wait 'draft test migration plan' # enqueue without waiting
acpx codex cancel                               # cooperative cancel
acpx codex -s api 'implement token pagination'  # named session
acpx --approve-all codex 'apply the patch and run tests'
acpx codex exec 'what does this repo do?'      # one-shot

Flows

acpx flow run <file> executes a TypeScript flow module:

Session Behavior

Configuration

Reads config in order (later wins): 1. ~/.acpx/config.json (global) 2. <cwd>/.acpxrc.json (project) 3. CLI flags (always win)

Output Formats

Stats

License

MIT