| title | CLI |
|---|---|
| description | Install the official AnyAPI CLI, manage auth, discover APIs, and run SKUs from your terminal. |
The official AnyAPI CLI is the npm package anyapi-cli with the anyapi binary.
Use it to install agent skills, register MCP, mint or store a key, discover APIs, and
run SKUs from a terminal.
Run the one-line setup:
npx -y anyapi-cli@latest initanyapi init installs the AnyAPI agent skills into detected agents, offers MCP
registration, and runs signup if no key is available.
For a global binary:
npm i -g anyapi-cli
anyapi initRepo: github.com/getanyapi-com/cli
| Command | What it does |
|---|---|
anyapi signup [--email <email>] [--label <label>] [--show-key] |
Creates a capped starter key, saves it locally, and prints claim guidance. The secret is hidden unless you pass --show-key. |
anyapi login --api-key aa_live_... |
Stores an existing dashboard key locally. |
anyapi search <query> |
Searches the public catalog and prints matching SKUs, names, and USD price terms. |
anyapi list [--category <category>] |
Lists catalog APIs, optionally filtered by category. |
anyapi describe <sku> |
Prints the authenticated API definition, including schemas and USD pricing. |
anyapi run <sku> --input '<json>' [-i file] [--fields a,b] [--max-items N] [--summary] [-o path] [--json] |
Runs an API with JSON input. |
anyapi balance |
Prints the remaining USD balance for the active key. |
anyapi claim |
Reprints stored claim guidance for a self-signed-up key. |
anyapi init [--all] [--yes] |
Installs bundled agent skills and shows or applies MCP setup snippets. |
anyapi setup skills |
Installs only the bundled skills. |
The CLI resolves auth in this order:
--api-keyflagANYAPI_API_KEYenvironment variable~/.anyapi/config.json- Interactive self-signup for commands that require auth
Application code should read ANYAPI_API_KEY. Do not make production app code depend
on ~/.anyapi/config.json.
Use anyapi signup to call the same self-signup endpoint documented in
Let your agent onboard itself:
npx -y anyapi-cli@latest signup --email you@example.com --label my-agentThis creates a capped starter key, stores it in ~/.anyapi/config.json, and prints the
claim URL. It does not print the secret key unless you pass --show-key. The starter
key has a small USD cap and a 7-day claim window until a human claims it.
By default, anyapi run writes JSON to:
.anyapi/<sku>-<timestamp>.json
The command prints the output path, costUsd, and item count. Use --json to print the
response JSON to stdout instead, or -o path to choose the output file.
Use these flags when a result would be too large for an agent context window:
| Flag | Effect |
|---|---|
--fields a,b |
Keeps only selected keys on each result item. |
--max-items N |
Caps returned rows. |
--summary |
Returns a structural outline instead of the bulk data. |
These flags trim only what is returned to you. They do not change the amount charged.
costUsd reflects the full result the API produced.
A starter key is capped until a human claims or funds it. If a run returns
402 key_cap_exceeded, run:
anyapi claimSend the claim URL and claim token to the human. After they claim the key in the dashboard, the same key continues working on their funded wallet.
If the wallet balance is too low, top up from the dashboard.