CLI
Run it
pnpm add -g @agntn/harnesses
harnesses detect
Every command that prints data takes --json, and --toon for the TOON encoding that fits a model context better. Without either you get a coloured listing.
| Command | Description |
|---|---|
harnesses list | Every known harness, id and name |
harnesses detect | Which ones are installed, with versions |
harnesses info <id> | The registry entry: capabilities, modes, every path with scope and level |
harnesses paths <id> | Paths resolved for this platform and home directory |
harnesses models <id> [search] | Models the harness can use, through its native listing |
harnesses run <id> <prompt> | One prompt through the harness's headless mode |
harnesses mcp-servers list|add|remove|sync | MCP servers across the config dialects |
harnesses agents sync [--check] | Link global instructions files to one master |
harnesses mcp | The MCP server over stdio |
Examples
harnesses info claude # metadata, including supported invocation modes
harnesses info codex --json
harnesses paths gemini --toon
harnesses models pi # what Pi has credentials for
harnesses models pi gpt-5.4 --json
harnesses run claude "review this design" # advisor without tools, the default
harnesses run pi --model openai-codex/gpt-5.4 "review this design"
harnesses run claude --tools "fix lint" # full agent
harnesses run codex --read-only "review" # tools inside a native read-only sandbox
harnesses run omp --json "summarize" # structured output
harnesses mcp-servers list
harnesses mcp-servers add omp probe --command node --args "srv.mjs mcp" --env "DEBUG=1"
harnesses mcp-servers remove omp probe --scope project
harnesses mcp-servers sync
harnesses agents sync --check
run
--tools and --read-only pick the mode, --json asks for the harness's structured output, --model a model id in the harness's own format, --cwd the working directory, --timeout a budget in seconds. --read-only implies --tools. A mode the harness cannot provide is rejected before anything runs, with the same message the library gives.
The harness's stdout and stderr pass through. Exit code is the harness's own; a timeout exits 124.
Exit codes
Unknown harness id, unsupported mode, invalid timeout: message on stderr, exit 1, no stack trace. A failed models call exits 1 with the harness's error. Everything else exits 0 with data.