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, their versions and how each one runs |
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 prompts sync [id] [--check] | Sync one XDG data prompt directory across harnesses |
harnesses skills sync [id] [--check] | Link every skills directory to the XDG data skills folder |
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 grok --read-only --effort low "quick one"
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
harnesses prompts sync --check
harnesses skills 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, and --no-tools beside it is rejected. A mode the harness cannot provide is rejected before anything runs, with the same message the library gives.
--effort sets reasoning effort in the harness's own words. --effort low keeps a quick question quick. Your xhigh config doesn't have to change for it. harnesses info paints effort green under Models where it works.
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.