Anthropic's official CLI: curl with manners
A resource-based command-line interface for the Claude API that handles file encoding, output formatting, and auth so you don't have to.

What it does
ant is Anthropic’s first-party CLI for the Claude Developer Platform. It wraps the API in a resource-based command structure (ant messages create, etc.) and handles the tedious parts: API key management, file uploads with automatic base64 encoding, and multiple output formats including JSON, YAML, and a “pretty” mode. It also supports GJSON transforms for filtering responses without reaching for jq.
The interesting bit
The @file syntax is the quietly useful part. Pass an image with --arg @abe.jpg and the CLI sniffs the filetype, encodes binary data as base64 automatically, and embeds it correctly in JSON payloads. You can override with @file:// or @data:// prefixes if the sniffing guesses wrong. It’s the kind of affordance that makes you wonder why every API CLI doesn’t do this.
Key highlights
- Resource-based commands:
ant [resource] <command>pattern, mirroring the API structure - Multiple output formats:
auto,json,yaml,pretty,raw, plus separate error formatting - Built-in GJSON transforms for response filtering without external tools
- File upload shorthand with automatic encoding detection and explicit overrides
- Debug mode exposes full HTTP request/response details
- Linkable against alternate Go SDK versions for development/testing
Caveats
- The README is almost entirely quickstart and installation; no mention of streaming, batch operations, or advanced features like prompt caching
- 509 stars suggests limited adoption or recent release; unclear maturity relative to community alternatives
Verdict
Worth a look if you’re already hitting the Claude API from scripts and tired of hand-rolling curl with base64-encoded attachments. Probably overkill for one-off queries; probably underpowered if you need complex workflow orchestration. The sweet spot is the “moderately automated” middle.
Frequently asked
- What is anthropics/anthropic-cli?
- A resource-based command-line interface for the Claude API that handles file encoding, output formatting, and auth so you don't have to.
- Is anthropic-cli open source?
- Yes — anthropics/anthropic-cli is open source, released under the MIT license.
- What language is anthropic-cli written in?
- anthropics/anthropic-cli is primarily written in Go.
- How popular is anthropic-cli?
- anthropics/anthropic-cli has 587 stars on GitHub.
- Where can I find anthropic-cli?
- anthropics/anthropic-cli is on GitHub at https://github.com/anthropics/anthropic-cli.