Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e884b98
codegen metadata
stainless-app[bot] May 28, 2026
bc42839
codegen metadata
stainless-app[bot] May 28, 2026
a4b09c3
codegen metadata
stainless-app[bot] May 29, 2026
1fe5018
codegen metadata
stainless-app[bot] May 29, 2026
c4f0954
chore(internal): update private repo name
stainless-app[bot] May 29, 2026
2168a5a
chore(internal): fix branch names
stainless-app[bot] Jun 1, 2026
f5c8f0f
docs: point security reports to Anthropic's HackerOne program (#5)
dtmeadows-ant Jun 2, 2026
20689c3
chore(internal): fix artifact url
stainless-app[bot] Jun 2, 2026
7573585
docs: add animated terminal demo
claude Jun 3, 2026
e22f218
docs: restructure README to match SDK conventions
claude Jun 3, 2026
8ecc617
docs: use claude-opus-4-8 in examples and lead with the ant name
claude Jun 3, 2026
fa89021
docs: update product name to Claude Platform
claude Jun 3, 2026
e8af31c
Update README.md
cj-ant Jun 3, 2026
ab8aed7
docs: move development docs into CONTRIBUTING.md
claude Jun 3, 2026
b8cea1b
Update CONTRIBUTING.md
cj-ant Jun 3, 2026
46d7f93
docs: replace README demo GIF with webm and poster frame
cj-ant Jun 3, 2026
46e0b71
docs: restore README demo GIF
cj-ant Jun 3, 2026
fb21b70
Merge pull request #8 from anthropics/claude/cli-readme-polish-xicMS
cj-ant Jun 4, 2026
0e8fae2
codegen metadata
stainless-app[bot] Jun 5, 2026
2454db4
docs: release-branch readiness sweep (model-release Step 5) + coverag…
stainless-app[bot] Jun 5, 2026
242c693
feat(api): small updates to Managed Agents types
stainless-app[bot] Jun 6, 2026
8302a45
feat(api): add support for claude-mythos-5 and claude-fable-5, with s…
stainless-app[bot] Jun 9, 2026
c5d792d
feat(api): manual updates
stainless-app[bot] Jun 9, 2026
cee82ed
release: 1.11.0
stainless-app[bot] Jun 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ runs:
using: composite
steps:
- uses: stainless-api/retrieve-github-access-token@1f03f929b746c5b03dcdafa2bebbb18ca5672e1a # v1.0.0
if: github.repository == 'stainless-sdks/anthropic-cli'
if: github.repository == 'anthropics/anthropic-sdk-cli-private'
id: get_token
with:
repo: stainless-sdks/anthropic-go
repo: anthropics/anthropic-sdk-go-private
stainless-api-key: ${{ inputs.stainless-api-key }}

- name: Configure Git for access to the Go SDK's staging repo
if: github.repository == 'stainless-sdks/anthropic-cli'
if: github.repository == 'anthropics/anthropic-sdk-cli-private'
shell: bash
run: git config --global url."https://x-access-token:${{ steps.get_token.outputs.github_access_token }}@github.com/stainless-sdks/anthropic-go".insteadOf "https://github.com/stainless-sdks/anthropic-go"
run: git config --global url."https://x-access-token:${{ steps.get_token.outputs.github_access_token }}@github.com/anthropics/anthropic-sdk-go-private".insteadOf "https://github.com/anthropics/anthropic-sdk-go-private"

- name: Setup go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand Down
Binary file added .github/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions .github/demo.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# VHS tape that records the demo GIF embedded in README.md.
#
# To re-record, run ./scripts/record-demo from the repository root. It builds
# the CLI, starts a local mock API server, places an `ant` wrapper pointed at
# the mock in /tmp/ant-demo, and runs vhs against this tape.

Output .github/demo.gif

Set Shell "bash"
Set FontSize 18
Set Width 1200
Set Height 680
Set Padding 24
Set WindowBar Colorful
Set TypingSpeed 30ms
Set CursorBlink false
Set Theme { "name": "Claude", "background": "#262624", "foreground": "#F0EEE6", "cursor": "#D97757", "selection": "#51504A", "black": "#262624", "red": "#E5484D", "green": "#62A87C", "yellow": "#D9A45B", "blue": "#7BA4C7", "magenta": "#C47ED1", "cyan": "#6FBFC9", "white": "#F0EEE6", "brightBlack": "#83827D", "brightRed": "#FF6369", "brightGreen": "#7DC894", "brightYellow": "#EBC06D", "brightBlue": "#96BDE0", "brightMagenta": "#D9A0E8", "brightCyan": "#8BD4DE", "brightWhite": "#FFFFFF" }

# Hidden setup: put the authenticated `ant` wrapper first on PATH.
Hide
Type `PATH="/tmp/ant-demo:$PATH"; clear`
Enter
Show

# Scene 1: send a message to Claude.
Type "ant messages create \"
Enter
Type " --model claude-opus-4-8 \"
Enter
Type " --max-tokens 1024 \"
Enter
Type ` --message '{role: user, content: "Hello, Claude"}'`
Sleep 500ms
Enter
Sleep 4.5s

# Scene 2: the same request, extracting just the reply text.
Type "ant messages create \"
Enter
Type " --model claude-opus-4-8 \"
Enter
Type " --max-tokens 1024 \"
Enter
Type ` --message '{role: user, content: "Hello, Claude"}' \`
Enter
Type " --transform content.0.text --raw-output"
Sleep 500ms
Enter
Sleep 3.5s

# Scene 3: browse a resource in the interactive explorer.
Hide
Type "clear"
Enter
Show
Type "ant models retrieve --model-id claude-opus-4-8"
Sleep 500ms
Enter
Sleep 2.5s
Down@300ms 6
Sleep 1s
Right
Sleep 2s
Down@300ms 3
Sleep 1.5s
Type "q"
Sleep 1.5s
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ on:
- 'stl-preview-base/**'

env:
GOPRIVATE: github.com/anthropics/anthropic-sdk-go,github.com/stainless-sdks/anthropic-go
GOPRIVATE: github.com/anthropics/anthropic-sdk-go,github.com/anthropics/anthropic-sdk-go-private

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork)

steps:
Expand All @@ -32,11 +32,11 @@ jobs:
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

- name: Link staging branch
if: github.repository == 'stainless-sdks/anthropic-cli'
if: github.repository == 'anthropics/anthropic-sdk-cli-private'
env:
REF_NAME: ${{ github.ref_name }}
run: |
./scripts/link 'github.com/stainless-sdks/anthropic-go@${{ github.ref_name }}' || true
./scripts/link 'github.com/anthropics/anthropic-sdk-go-private@${{ github.ref_name }}' || true

- name: Bootstrap
run: ./scripts/bootstrap
Expand All @@ -50,7 +50,7 @@ jobs:
permissions:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -60,11 +60,11 @@ jobs:
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

- name: Link staging branch
if: github.repository == 'stainless-sdks/anthropic-cli'
if: github.repository == 'anthropics/anthropic-sdk-cli-private'
env:
REF_NAME: ${{ github.ref_name }}
run: |
./scripts/link 'github.com/stainless-sdks/anthropic-go@${{ github.ref_name }}' || true
./scripts/link 'github.com/anthropics/anthropic-sdk-go-private@${{ github.ref_name }}' || true

- name: Bootstrap
run: ./scripts/bootstrap
Expand All @@ -79,7 +79,7 @@ jobs:

- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/anthropic-cli' &&
github.repository == 'anthropics/anthropic-sdk-cli-private' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
Expand All @@ -88,7 +88,7 @@ jobs:

- name: Upload tarball
if: |-
github.repository == 'stainless-sdks/anthropic-cli' &&
github.repository == 'anthropics/anthropic-sdk-cli-private' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
test:
timeout-minutes: 20
name: test
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -157,11 +157,11 @@ jobs:
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

- name: Link staging branch
if: github.repository == 'stainless-sdks/anthropic-cli'
if: github.repository == 'anthropics/anthropic-sdk-cli-private'
env:
REF_NAME: ${{ github.ref_name }}
run: |
./scripts/link 'github.com/stainless-sdks/anthropic-go@${{ github.ref_name }}' || true
./scripts/link 'github.com/anthropics/anthropic-sdk-go-private@${{ github.ref_name }}' || true

- name: Bootstrap
run: ./scripts/bootstrap
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.10.0"
".": "1.11.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic/anthropic-71eed687650366ea3e1abe6cfed0d15877e6423a56ecf7193a952fd4ee0cb72b.yml
openapi_spec_hash: 2790eecb0b38738a32441184273601a7
config_hash: 70d06a7957e45a3ea82fb73a3f269ccc
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic/anthropic-e171bad0ea7923db27b0b640915579588c46e44f26c0d4b2bfd63eb6da486b2a.yml
openapi_spec_hash: 29b3b2ba0d00467b5c6943533fa0c07a
config_hash: 12441a8fae7ee2cb6a2accf3a5fa43ee
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## 1.11.0 (2026-06-09)

Full Changelog: [v1.10.0...v1.11.0](https://github.com/anthropics/anthropic-cli/compare/v1.10.0...v1.11.0)

### Features

* **api:** add support for claude-mythos-5 and claude-fable-5, with support for server-side fallbacks on refusal ([8302a45](https://github.com/anthropics/anthropic-cli/commit/8302a45f5d5a6df0289f9061e9cd6318d7530c63))
* **api:** manual updates ([c5d792d](https://github.com/anthropics/anthropic-cli/commit/c5d792d52248a85aa9adf7d33f8ae7bd88ae949a))
* **api:** small updates to Managed Agents types ([242c693](https://github.com/anthropics/anthropic-cli/commit/242c69330b3c195defc83ffded8eeb634c136968))
* **client:** adds client-side fallbacks middleware for API providers that do not support server-side fallbacks ([8302a45](https://github.com/anthropics/anthropic-cli/commit/8302a45f5d5a6df0289f9061e9cd6318d7530c63))


### Chores

* **internal:** fix artifact url ([20689c3](https://github.com/anthropics/anthropic-cli/commit/20689c394a7eae8edc47a2070d6b65259bd9f1d5))
* **internal:** fix branch names ([2168a5a](https://github.com/anthropics/anthropic-cli/commit/2168a5a12630129de4cb05e75447ad9d08185d05))
* **internal:** update private repo name ([c4f0954](https://github.com/anthropics/anthropic-cli/commit/c4f09545a37a0401ee14fee042585ca0e1fefe80))


### Documentation

* add animated terminal demo ([7573585](https://github.com/anthropics/anthropic-cli/commit/75735853716522fe7363f6df7efe45e89bf76df9))
* move development docs into CONTRIBUTING.md ([ab8aed7](https://github.com/anthropics/anthropic-cli/commit/ab8aed756a4edeb242f5470f643eb30348e0a12c))
* point security reports to Anthropic's HackerOne program ([#5](https://github.com/anthropics/anthropic-cli/issues/5)) ([f5c8f0f](https://github.com/anthropics/anthropic-cli/commit/f5c8f0faa5eeee57e5c644cf09465a0d48852aad))
* release-branch readiness sweep (model-release Step 5) + coverage-audit refinements ([2454db4](https://github.com/anthropics/anthropic-cli/commit/2454db4a3c1a2d77761c48a3285c0850ff547eea))
* replace README demo GIF with webm and poster frame ([46d7f93](https://github.com/anthropics/anthropic-cli/commit/46d7f93d32750879f84a15be69e6b674891a7f05))
* restore README demo GIF ([46e0b71](https://github.com/anthropics/anthropic-cli/commit/46e0b71e0cd581cc3764ff1970dd02d32caf6c00))
* restructure README to match SDK conventions ([e22f218](https://github.com/anthropics/anthropic-cli/commit/e22f218a4c1b5f6edd955a37e31eb59922c1a7eb))
* update product name to Claude Platform ([fa89021](https://github.com/anthropics/anthropic-cli/commit/fa89021825e94af94ae5df03ce9a1e0fbdc3ad2a))
* use claude-opus-4-8 in examples and lead with the ant name ([8ecc617](https://github.com/anthropics/anthropic-cli/commit/8ecc617d62bd23f1df0c6705b8dd289d2cb32cf1))

## 1.10.0 (2026-05-28)

Full Changelog: [v1.9.3...v1.10.0](https://github.com/anthropics/anthropic-cli/compare/v1.9.3...v1.10.0)
Expand Down
77 changes: 77 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
## Contributing to documentation

The documentation for the CLI lives at [platform.claude.com/docs/en/api/sdks/cli](https://platform.claude.com/docs/en/api/sdks/cli). To suggest changes, open an issue.

## Setting up the environment

To set up the repository, run:

```sh
$ ./scripts/bootstrap
$ ./scripts/lint
```

This will install all the required dependencies and build the CLI.


## Modifying/Adding code

Most of the CLI's command code is generated from the API spec. Modifications to generated code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator.

## Running the CLI locally

Use the `scripts/run` script to build and run the CLI from source:

```sh
$ ./scripts/run messages create --help
```

To produce a standalone binary instead, run `./scripts/build`, which places an `ant` binary in the repository root.

## Linking different Go SDK versions

The CLI is built on the [Anthropic Go SDK](https://github.com/anthropics/anthropic-sdk-go). You can link the CLI against a different version of the SDK using the `./scripts/link` script.

To link to a specific version from a repository (version can be a branch, git tag, or commit hash):

```sh
$ ./scripts/link github.com/org/repo@version
```

To link to a local copy of the SDK:

```sh
$ ./scripts/link ../path/to/anthropic-go
```

If you run the link script without any arguments, it will default to `../anthropic-go`. Run `./scripts/unlink` to undo.

## Running tests

Tests run against a mock server set up from the OpenAPI spec. Most of the time the test script manages the mock server for you:

```sh
$ ./scripts/test
```

To run the mock server yourself (for example, to run the CLI against it manually), use:

```sh
$ ./scripts/mock
```

## Formatting

This repository uses the standard gofmt code formatter:

```sh
$ ./scripts/format
```

## Re-recording the README demo

The demo GIF at the top of the README is recorded with [VHS](https://github.com/charmbracelet/vhs) from [`.github/demo.tape`](.github/demo.tape). After changing the tape or the examples it shows, re-record it with:

```sh
$ ./scripts/record-demo
```
Loading
Loading