Free · open source
GPLv3, royalty-free or commercial — your choice$0forever
- Terminal UI and headless runs
- Sandboxed tools by default
- Local cost ledger
A modular terminal coding agent in Rust with a safe, event-driven core.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/pyrlyn/cox/releases/latest/download/cox-installer.sh | sh
See it run
$ cox # Enter sends, Esc interrupts $ cox "explain the layout of this repository" # optionally with a first prompt
$ cox run -p "add a unit test for parse_args" --output-format json --max-turns 20 $ cox run --continue -p "now run the tests" $ cox sessions --grep "parse_args" $ cox stats --day
$ cox acp # Zed and JetBrains, over the Agent Client Protocol $ cox mcp --allow-write # built-in tools for other agents; read-only unless you opt in
Overview
cox is named for the coxswain: it steers the work while models, tools, and extensions row. It is one reliable, testable agent core with several ways to use it: an interactive terminal UI, headless automation, editor integration through ACP, and MCP tools for other agents.
cox is under active development. APIs, configuration, and installation instructions are not yet stable.
Features
Submissions enter a pure core state machine and typed events leave it. The TUI, headless runs, editor clients and MCP all consume the same events.
Permission decisions are centralized, model paths stay inside the workspace, and shell commands run in a sandbox (seatbelt on macOS; bubblewrap or Landlock with seccomp on Linux) unless you deliberately choose otherwise.
Full tool output is archived before it is shortened for the model, so it stays retrievable by id with cox expand.
Provider usage is recorded per request in a local ledger; routing between the cheap, code and think tiers is explicit. cox stats reads it by session, day or month.
Anthropic and OpenAI, plus OpenAI-compatible endpoints such as DeepSeek, OpenRouter, Moonshot, Z.ai and local servers, configured per tier.
Streaming replies, approval prompts, a diff view, folded tool cards, vim keys and a screen-reader mode (--plain).
cox acp serves Zed and JetBrains over the Agent Client Protocol; cox mcp serves the built-in tools to other agents (read-only unless you opt in).
Traces go to Jaeger, Grafana, SigNoz or any OTLP backend.
Install
Prebuilt binaries for macOS (Apple silicon) and Linux (x86-64 and arm64):
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/pyrlyn/cox/releases/latest/download/cox-installer.sh | sh
From source (Rust is pinned with mise):
git clone https://github.com/pyrlyn/cox && cd cox
mise exec -- cargo build -p cox
Update an installed binary with cox self update.
Check the machine, then run one prompt headlessly:
export ANTHROPIC_API_KEY=sk-... # or OPENAI_API_KEY
cox doctor
cox run -p "create hello.txt containing hi"
More examples below.
Usage examples
Open the interactive TUI (Enter sends, Esc interrupts; y/s/n answer approval prompts, /model switches tiers, /compact compacts context), optionally with a first prompt:
cox
cox "explain the layout of this repository"
Script a headless run and pick up where it stopped:
cox run -p "add a unit test for parse_args" --output-format json --max-turns 20
cox run --continue -p "now run the tests"
Find a past session, read archived output and costs:
cox sessions --grep "parse_args"
cox expand <id> --lines 60-90
cox stats --day
cox stats --cache
Inspect configuration and extensions:
cox config show --sources
cox config set tiers.code.model '"claude-sonnet-5"'
cox ext list
Serve cox to an editor or another agent:
cox acp
cox mcp --allow-write
Links
You can use cox under any of the following licenses, at your choice:
Pricing
Pro is a placeholder$0forever
$15 / moper seat
Placeholder — the Pro waitlist is not open yet.
Free and open source. Star it, file an issue, or send a pull request.