Comparison · Checked 2026-10-23

Compare

Several efforts want command-line tools that agents can rely on. Here's how they line up.

Machine Mode and CLI Agent Spec are both specifications for CLIs that AI agents call; clig.dev and 12 Factor CLI Apps are design guidelines written for people at a terminal. The two agent specs agree on more than they differ, and where they differ it's mostly about shape: one JSON envelope per command, or a stream of events.

Everything about other projects below comes from their own published pages, read on 2026-10-23. If something here is out of date, open an issue and it gets fixed.

Side by side

Comparison of CLI guidance for AI agents
Machine Mode (AOI-CLI 1.0-alpha)CLI Agent Spec v1.16clig.dev12 Factor CLI Apps
Written forAI agents and automation calling a CLIAI agents calling a CLIPeople at a terminal, with script-friendly optionsPeople at a terminal
Output shapeA JSONL event stream: aoi:meta first, typed events, aoi:summary lastOne JSON envelope per command: ok, data, error, warnings, metaRecommends --json, plus --plain for line toolsSee the essay
StreamingEvery run is a stream; unbounded streams are definedOpt-in --format jsonl / --stream (REQ-O-004), plus progress and heartbeatsNot specifiedSee the essay
ErrorsClosed category list, stable code, required retryable, retry_after_mscode and message, retryable, retry_after_ms (REQ-C-014), an executable fix_command (REQ-C-030)Human-readable error guidanceSee the essay
Exit codessysexits-compatible (64 to 78), plus 124, 130 and 14115 named codes, 0 to 14, each with retryable and side_effectsZero on success, non-zero mapped to the main failure modesSee the essay
Discoveryschema and capabilities commands that must work offline, without credentialsDeclared input and output schemas, --schema, a tool manifest commandHelp text and docsHelp text
Success signalaoi:summary.ok with no default; no summary means the run is incompleteok in the envelope, and meta.exit_codeExit statusExit status
Conformanceaoi-lint, per factor (in development); aoi-probe measures any CLI todayA deterministic conformance kit with levelsNone; guidelinesNone; guidelines
SizeA small required core (Part I) plus a recommended profile (Part II)167 requirements: 81 framework-automatic, 36 command contract, 50 opt-inOne long guideTwelve principles
Published evidenceA measured survey of 16 widely used CLIs76 documented failure modesNot applicableNot applicable
Maintained byKevin Hunt, github.com/agentoperablegithub.com/cli-agent-spec (no individual named on the site)Aanand Prasad, Ben Firshman, Carl Tashian, Eva ParishJeff Dickey (2018, from the Heroku CLI and oclif work)

Envelope or stream

The one real design difference.

CLI Agent Spec wraps each command's result in a single JSON object, which is easy to parse and easy to check: read ok, then data. Streaming is available as an opt‑in mode. Machine Mode makes every run a stream, so long operations stay observable, a consumer can act on the first result early, and a cut stream shows up as a missing final summary or a gap in seq.

Both arrived at the same answers on retries. Each carries a retryable flag and a retry_after_ms delay, and each tells the agent when a side effect may already have happened: CLI Agent Spec through side_effects on its exit codes, Machine Mode by requiring retryable:falsewhenever the tool can't tell.

Field mapping: CLI Agent Spec to AOI-CLI

For tools or consumers that want to speak both.
CLI Agent Spec to AOI-CLI field mapping
CLI Agent SpecAOI-CLINotes
okaoi:summary.okBoth explicit booleans.
dataDomain eventsOne event per record, each with its own type.
error.codeaoi:error.code + categoryAOI adds a category from a closed list for routing.
retryableretryableSame meaning; required on every AOI error.
retry_after_msretry_after_msSame field name and unit.
warningsaoi:warning eventsEmitted in the stream where they occur.
meta.exit_codeProcess exit statusAOI keeps the exit code on the process, not in the payload.
Schema and tool versions in metaaoi:meta and aoi:summaryAOI carries tool, AOI and schema versions at both ends of the stream.
Request and trace IDs in metaaoi.run and aoi.trace_idOn every event, so a line stays attributable after a grep.

Which to follow

They don't exclude each other.

clig.dev and 12 Factor CLI Apps are about the human interface, and nothing in either agent spec conflicts with them: follow them for the default output and pick an agent spec for the machine mode. If your tool already emits one JSON document per command, CLI Agent Spec asks for less change. If your commands run long, stream results, or feed pipelines, Machine Mode fits the shape you already have.

Sources

  1. CLI Agent Spec v1.16, cli-agent-spec.github.io, read 2026-10-23.
  2. Command Line Interface Guidelines, clig.dev, read 2026-10-23.
  3. Jeff Dickey, “12 Factor CLI Apps,” 2018.
  4. AOI‑CLI v1.0-alpha, machinemode.io/spec.