06-reference

anthropic ant cli api command line tool

2026-06-03·reference·source: Anthropic docs·by Anthropic (platform docs)
anthropicant-cliclaude-apitoolingcliclaude-codemanaged-agentsscripting

ant — Anthropic's Claude API command-line tool

Filed 2026-06-03 after founder asked what ant is and how it relates to Claude Code. All facts below verified directly against the doc (not from memory).

Why this is in the vault

ant is Anthropic's official command-line client for the Claude API, and it matters to RDCO on two specific fronts. First, it is a clean, dependency-light candidate path for giving the air-gapped phData work-agent Claude API access for scripting (a third lens alongside the Gmail-MCP vs local-script email-path debate) without standing up a daemon. Second, it makes Managed Agents and Skills version-controllable as YAML kept in sync with the API, which dovetails with the dynamic-workflows / reproducible-artifact direction the COO-agent tooling layer is heading toward. Captured as a primary-source reference (verified directly against the doc, not memory) so the load-bearing distinction is on file: Claude Code is the agentic harness that DOES the work; ant is the one-shot API client you SCRIPT against.

What it is (one line)

ant is a thin, schema-aware command-line wrapper around the Claude API — like curl but every API resource is a subcommand, requests build from typed flags or piped YAML, and you extract fields with a built-in --transform (GJSON path; no jq needed). List endpoints auto-paginate.

vs Claude Code (complementary, not competing — different layers)

Use within Claude Code (first-class)

The doc has a dedicated "Use the CLI from Claude Code" section. Verbatim: "Claude Code shells out to ant, parses the structured output, and reasons over the results (no custom integration code required)." Claude Code knows ant natively — e.g. "list my recent agent sessions and summarize which ones errored" runs ant under the hood. Also the intro line: "Claude Code understands how to use ant natively."

Mapping against Ray Data Co

Related