Learning resourcesReviewed · Anthropic

Claude API CLI (ant) quickstart

This is the official quickstart page for ant, the command-line tool for the Claude API. It is written for developers who want to call Claude from a terminal. It focuses on installation, authentication, a first API request and shell completion, and briefly introduces other CLI capabilities. Its main catch is that it says nothing about pricing. The page shows three ways to install (Homebrew on macOS, a release-binary download for Linux/WSL, and go install), a browser-based login with ant auth login, a sample ant messages create call, and shell completion setup for bash, zsh, fish and PowerShell.

Researched 13 Nov 2026

In short.

This is the official quickstart page for ant, the command-line tool for the Claude API. It is written for developers who want to call Claude from a terminal. It focuses on installation, authentication, a first API request and shell completion, and briefly introduces other CLI capabilities. Its main catch is that it says nothing about pricing. The page shows three ways to install (Homebrew on macOS, a release-binary download for Linux/WSL, and go install), a browser-based OAuth login, a sample ant messages create call with its expected output, and shell completion setup. It says ant exposes every API resource as a subcommand, builds request bodies from typed flags or YAML, inlines file contents with an @path reference, filters responses with a built-in --transform query and paginates list endpoints automatically. Nothing here was run or tested, so all behaviour below is as the page describes it. This page does not establish costs, licence terms, whether the version shown is current, or how to install on native Windows.

Researched and written by an AI model and checked by a second AI model. How it works

This report covers only the complete text of the one page captured from [https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart.md] on 13 November 2026. The URL declared in the page metadata is [https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart]. The pages it links to were not read, so their content is not assessed. These are CLI authentication options, Using the CLI, CLI scripting and automation, the Messages API reference, the GitHub releases page at [https://github.com/anthropics/anthropic-cli/releases] and the repository. The video demo referenced on the page is not covered. No licence or pricing notice appeared in the captured text. Nothing was installed, executed or run: the commands, output and behaviour are reported as the page describes them.

The overview

What this resource is

This resource is a single documentation page titled CLI quickstart. It was captured from [https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart.md]. The URL declared in the page metadata is [https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart]. The page says its purpose is to help you install the ant command-line tool, authenticate, and send a first request to the Claude API.

The Linux install snippet points at the GitHub repository anthropics/anthropic-cli, and the go install line uses the module path github.com/anthropics/anthropic-cli/v2/cmd/ant. The domain and the repository organisation indicate that Anthropic publishes it, though the page has no explicit authorship statement.

Overall assessment

As a quickstart it is short, concrete and well ordered: install, check the version, log in, send one request, then optionally set up shell completion. A reader who already has a terminal and a Claude Console account could plausibly reach a working command by following it. That is a reading of the text, not something confirmed by running it.

Its depth is deliberately shallow. The page says it only gets you to a working command. It sends you to other pages for endpoint parameters, command structure, output formats, other ways to authenticate, and scripting. Those linked pages were not reviewed, so claims about the CLI beyond this page are not assessed.

Who it is for

The page suits developers and technically inclined people who want to call the Claude API from a shell for quick experiments, scripts or automation, and who find hand-written curl requests with JSON bodies tedious. It makes that comparison directly. Instead of hand-written JSON, ant builds request bodies from typed flags or piped YAML. It also extracts response fields itself, so you don't need a separate tool such as jq.

Beginners can follow the steps if they are comfortable opening a terminal and pasting commands, but the page assumes you know what the Claude API and the Claude Console are. The page is about accessing the Claude API from the terminal. It gives no example of an interactive chat session.

What the CLI is said to do

According to the page, every API resource is exposed as a subcommand, with output formatting, response filtering, and YAML or JSON file input. It names these specific features: typed flags or piped YAML for building request bodies; an @path reference that inlines file contents into string fields; a built-in --transform query for extracting response fields; and automatic pagination of list endpoints.

The page also covers browser-based login (ant auth login), which stores credentials locally so you do not need to create or manage an API key. It also covers shell completion scripts for bash, zsh, fish and PowerShell. Other ways to authenticate are mentioned only by name: an API key environment variable, headless hosts, multiple workspaces, named profiles and Workload Identity Federation. How these work is explained on a linked page that was not reviewed.

The only worked API request is ant messages create, with a model, a max-token limit and a single user message. It calls the Messages API.

Using it

What you need

What you need depends on how you install. For Homebrew, you need macOS with Homebrew. For the binary download, you need a Linux or WSL environment with curl, tar and sudo access, because the snippet extracts into /usr/local/bin. For go install, you need Go 1.26.10 or later, plus a PATH entry for the Go binary directory.

For login you need a web browser, since ant auth login opens an OAuth flow against the Claude Console. That implies a Claude Console account, although the page does not spell out account or access requirements. The page does not describe native Windows installation. It lists WSL for the binary download and mentions PowerShell only for shell completion. This page does not say whether go install works on native Windows.

Network access to GitHub (for the binary download) and to the Claude API is implied. The page does not state any account tier, spending limit or model-access requirement.

How it works

The CLI is a command-line client for the Claude API. Each API resource maps to a subcommand. You supply request fields as flags, as inline YAML-style values, or as piped YAML, with YAML or JSON file input also described. The login command runs a browser OAuth flow and keeps the resulting credentials on your machine, and the CLI then uses them for calls.

The page notes that the response in its example is the full API object, pretty-printed because stdout is a terminal. That suggests output is formatted differently when piped, but the exact rules are not described here. The page does not explain where credentials are stored, how they are protected or how they expire.

Setup steps

Install: on macOS, run brew install anthropics/tap/ant. On Linux or WSL, the page gives a shell snippet that sets VERSION=2.9.0 and works out the OS and CPU architecture. It then downloads the matching tar.gz from the GitHub releases page and pipes it to sudo tar into /usr/local/bin. Its architecture mapping covers only x86_64 (amd64) and aarch64 (arm64). For other architectures, the snippet neither assigns ARCH nor handles the unsupported case. The third option is go install github.com/anthropics/anthropic-cli/v2/cmd/ant@latest. This places the binary in the Go binary directory, which you may need to add to PATH.

Then run ant --version to check the install, and ant auth login to authenticate. For shell completion, generate a script by running ant @completion followed by zsh, bash, fish or powershell, and redirect it to the location shown for your shell.

The page describes no way to verify the downloaded binary (checksum or signature), and no upgrade or uninstall steps.

Worked example

The page's example sends a message with this command: ant messages create, with the options --model claude-opus-5-5, --max-tokens 1024 and --message set to a role-and-content object whose user content is Hello, Claude. The sample output is a JSON message object with an id, role assistant, one text content block greeting the user, a stop reason of end_turn, and a usage block showing 27 input tokens and 20 output tokens.

This output is copied from the documentation and was not reproduced. The model name claude-opus-5-5 is used as shown on the page. Whether that model is available to a given account was not checked. The usage block reports token counts even for a trivial request. This page does not establish how those counts relate to charges.

Assessment & evidence

Limitations and caveats

Scope: this is a quickstart only. messages create is the only worked API request, and there is no troubleshooting section. It does not show error handling or streaming. It also gives no worked example of @path file input or --transform, even though it mentions those two features.

Installation: the Linux snippet pins version 2.9.0 while go install uses @latest, so the two methods may install different versions. The snippet pipes a download into sudo tar with no verification. Native Windows install is not described.

Verification: nothing was executed. The install commands, login behaviour, example call and shell completion steps are reported as documented, not as confirmed. Features that the page only names, such as named profiles or Workload Identity Federation, are not assessed.

Reasoning behind this assessment

The page is useful because it takes a reader from nothing to a first API call in a few commands. It also explains the practical reason to prefer ant over curl: typed flags and YAML instead of hand-built JSON, built-in response filtering and automatic pagination. These are the page's own claims, and they are specific enough for anyone who installs the tool to check.

The assessment is cautious because the evidence is one short page. It gives a clear picture of how to start, but not of how reliable, complete or well supported the CLI is in real use.

Alternatives

The page names curl as the direct comparison: calling the HTTP API yourself with hand-written JSON. The page compares ant with hand-written curl requests and names jq as an example of a separate response-filtering tool; it does not establish their installation requirements or provide a complete feature comparison.

Use from Claude Code is mentioned in the scripting card's description, but this page gives no details about it. The page is about API access from the terminal and gives no example of an interactive chat session.

Evidence base

The only evidence is the full text of this one documentation page, captured on 13 November 2026 (evidence_f722bc96-2c93-482a-9fca-d9e6c7d58ec6). It includes the install tabs, the authentication note, the example command and output, the completion instructions and the next-step cards. A video demo is referenced, but its content is not part of the text and was not assessed.

Everything in this report can be traced to that page. Statements about how the CLI behaves are the page's claims, not independent observations.

Access & freshness

Costs

The page states no prices. It does not say whether the CLI itself is free, and it gives no API pricing, rate limits, free allowance or billing details. These are unknown from this evidence.

The sample response reports input and output token counts; billing units, rates and charges are not established here. The page does not say whether running the example needs a Console account, a payment method or credits. Check Anthropic's pricing information separately before running scripts at volume.

Rights and licence

The captured page contains no licence statement, copyright notice or terms of use for the documentation, the ant binary or the source repository. So this evidence does not show the licence terms for the CLI, the rights to reuse the page text, or the terms that govern API use.

The page links to a GitHub releases page and a module you can install with go install, which suggests the source is public, but the licence there was not reviewed. Do not assume you may redistribute the binary or reuse the documentation text until you have checked the repository and Anthropic's terms.

Freshness

The page shows no publication or last-updated date. It was captured on 13 November 2026. The only version clues are VERSION=2.9.0 in the Linux install snippet and a requirement for Go 1.26.10 or later. Whether 2.9.0 is still the newest release is unknown from this evidence.

Documentation pages like this can change as new CLI versions are released. Confirm the install version, the Go version and the example model name against the GitHub releases page and current Claude documentation.

Suggested next steps

If you want to try it, pick the install method for your system, run ant --version, then ant auth login, and send the example message. Read the Linux snippet before running it, and consider checking the downloaded release yourself, since the page describes no verification.

Before relying on the tool, read the linked pages on authentication, using the CLI and scripting, check Anthropic's pricing for the model you plan to call, and look at the repository's licence. Confirm the example model name is available to your account, and swap in one you can use if it is not.

Evidence for this report

selected-page.txtselected · checked 2026-11-13