scripting changedcli-sdks-libraries/cli/scripting
Nearest release: v2.1.312, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+4added
Lines−4removed
From line
98
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits12to this page, all time
The whole hunk
from line 98, old and new numbered
/
from line 98
9898
9999[Claude Code](https://code.claude.com/docs/en/overview) can use the `ant` CLI out of the box. With the CLI installed and authenticated, you can ask Claude Code to operate on your API resources directly. For example:
100100
101* "List my recent agent sessions and summarize which ones errored."
102* "Upload every PDF in `./reports` to the Files API and print the resulting IDs."
103* "Pull the events for session `session_01...` and tell me where the agent got stuck."
101* “List my recent agent sessions and summarize which ones errored.”
102* “Upload every PDF in `./reports` to the Files API and print the resulting IDs.”
103* “Pull the events for session `session_01...` and tell me where the agent got stuck.”
104104
105105Claude Code runs `ant` commands, parses the structured output, and reasons over the results (no custom integration code required).
106106
from line 108
108108
109109Scripts that call the API with `curl` or another HTTP client can use the credentials stored by [`ant auth login`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart#authentication) instead of a static API key. The OAuth access token goes in the `Authorization` header as a bearer token; the `x-api-key` header is only for static API keys.
110110
111`ant auth print-credentials --access-token` prints the active profile's access token, refreshing it first if it is expired or near expiry:
111`ant auth print-credentials --access-token` prints the active profile’s access token, refreshing it first if it is expired or near expiry:
112112
113113```bash cURL
114114curl https://api.anthropic.com/v1/messages \
No line in this hunk matches that.