> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcard.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> The agent-cards CLI: manage your organization from the terminal, and give coding agents a tool catalog they can call.

The `agent-cards` CLI does everything the dashboard does, from the terminal. Personal commands are top level. Organizations use the `companies` namespace.

## Install and sign in

```bash theme={null}
npm install -g agent-cards
agent-cards login
```

A sign-in link and short code appear, and you approve in your browser. For scripts and CI, `agent-cards login --email you@example.com` sends a one-time code and `--code 123456` completes it without a browser. Update any time with `agent-cards update`.

Then pick the organization you work in:

```bash theme={null}
agent-cards companies list
agent-cards companies use ORG_ID
```

## Organization commands

All of these live under `agent-cards companies`. Sandbox or production follows the credentials in use, the same rule as the API.

| Command                                                | What it does                                                                        |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| `create` / `list` / `get` / `use`                      | Create an organization, list yours, pick the active one                             |
| `credentials create` / `list` / `revoke`               | Manage the OAuth clients behind your `client_id` and `client_secret`                |
| `env test` / `env production`                          | Point the CLI at sandbox or production credentials                                  |
| `balance get` / `provision` / `transfers` / `settings` | See and manage the company balance                                                  |
| `balance test-fund`                                    | Add sandbox balance so you can test issuing end to end                              |
| `balance withdraw`                                     | Withdraw from the company balance                                                   |
| `webhooks list` / `create` / `update` / `delete`       | Manage webhook endpoints                                                            |
| `webhooks reveal` / `roll-secret`                      | Read or rotate an endpoint's signing secret                                         |
| `webhooks deliveries` / `test`                         | See recent deliveries, or send a test event                                         |
| `webhooks listen`                                      | Stream events to your terminal and forward them to a local server, no tunnel needed |
| `members`                                              | Manage who is in the organization                                                   |
| `subscribe`                                            | Start the subscription that unlocks production                                      |
| `return-urls`                                          | Set where hosted flows send users back to                                           |
| `engineer`                                             | Ask the Agentcard engineer agent a question about your integration                  |

Use `--help` on any command for flags:

```bash theme={null}
agent-cards companies webhooks test --help
```

## Personal commands

The same CLI runs a personal Agentcard account. Useful for testing what your users will experience.

| Command                                    | What it does                                              |
| ------------------------------------------ | --------------------------------------------------------- |
| `signup` / `login` / `logout` / `whoami`   | Account and session                                       |
| `wallet` / `balance` / `fund` / `withdraw` | See cards and cash, add cash, withdraw                    |
| `cards create` / `list` / `get` / `close`  | Issue and manage cards                                    |
| `add`                                      | Put your own card in the Vault                            |
| `transactions`                             | Per-card or account-wide history                          |
| `kyc`                                      | One-time identity verification from the terminal          |
| `buy`                                      | Shop and check out at supported merchants                 |
| `approvals`                                | List, approve, or deny requests from connected apps       |
| `connections`                              | List or revoke third-party apps connected to your account |
| `rewards` / `redeem`                       | Tokenback balance and promo codes                         |
| `payment-method` / `plan` / `settings`     | Saved payment methods, subscription, preferences          |
| `support`                                  | Start a live support conversation                         |

## For coding agents

Two commands turn the CLI into a tool surface an agent can drive without prompts.

`agent-cards api` is the tool catalog: every account tool, with JSON on stdout and `{error, hint}` envelopes on failure.

```bash theme={null}
agent-cards api --agent-help          # load this once into the agent's context
agent-cards api tools                 # every tool name
agent-cards api search <regex>        # find tools
agent-cards api describe <tool>       # a tool's input and output schema
agent-cards api call <tool> '<json>'  # invoke one (pipe JSON via - for stdin)
```

`agent-cards agents add` teaches Claude Code, Codex, or Gemini to drive Agentcard by installing steering blocks that refresh themselves when the CLI updates. `agent-cards setup-mcp` configures the [MCP server](/tools/mcp) in Claude Code in one step.

Most interactive commands also accept `--yes` to skip confirmations and `--json` for machine-readable output, for example `cards create --amount 25 --yes --json`.

## Rules for your agent

```text theme={null}
- companies use ORG_ID scopes every later command. Check it before anything destructive, such as credentials revoke or webhooks roll-secret.
- env test and env production decide which credentials the CLI uses, and sandbox or production follows from that.
- In scripts and CI, sign in with login --email and --code; there's no browser to approve in.
- Run webhooks test against your endpoint before going live. It's the fastest proof that signature verification works.
```
