# agent-cards

The Agentcard CLI. One product, two doors: **Personal** gives your own AI agent a card; **`companies`** issues cards to every agent your users run. Also installed as `agentcard`.

```bash
npx -y agent-cards@latest              # guided setup: sign in, connect your agent, fund — and it offers to install itself
npx -y agent-cards@latest agents add   # teach your coding agents (Claude Code, Codex, Gemini) to use Agentcard
```

Or install directly: `npm install -g agent-cards`.

Docs: [docs.agentcard.sh](https://docs.agentcard.sh)

## Personal — a card for your agent

```bash
agent-cards login                      # emails you a one-time code
agent-cards setup-mcp                  # add the Agentcard MCP to Claude Code (OAuth, no tokens to manage)
agent-cards fund --amount 20           # add cash to your balance (Apple/Google Pay)
agent-cards cards create --amount 25   # issue a one-time virtual card from your balance
agent-cards buy "paper towels from Costco on DoorDash"
```

Sign-in emails a **code** (no passwords, no magic links). Driving the CLI as an agent without a terminal:

```bash
agent-cards login --email their@email.com          # emails a code, exits 2 with code_required
agent-cards login --email their@email.com --code 123456
```

Everything else: `agent-cards --help` (wallet = your cards + balance; rewards, buy, kyc, plan, connections, support).

## Companies — issue cards to your users' agents

Everything that used to live in `agent-cards-admin` (still published as a forwarding shim, so old commands keep working):

```bash
agent-cards companies create           # create a company
agent-cards companies use acme         # set the default company (like the dashboard switcher)
agent-cards companies credentials create   # client credentials for your servers (API keys are retired)
agent-cards companies balance get
agent-cards companies subscribe        # unlock production
```

**Env vars.**

| Var | Effect |
|---|---|
| `AGENT_CARDS_API_URL` | API base URL (default `https://api.agentcard.sh`; legacy `ADMIN_API_URL` still honored for companies commands) |
| `AGENT_CARDS_JWT` | Bearer token to use instead of a stored login session (legacy `AGENT_CARDS_ADMIN_JWT` still honored) |
| `AGENT_CARDS_MCP_URL` | MCP server URL override (default derived from the API URL) |
| `AGENT_CARDS_SKIP_UPDATE=1` | Skip the pre-command auto-update check (also skipped under `CI`) |
| `DO_NOT_TRACK=1` or `AGENT_CARDS_TELEMETRY=0` | Disable telemetry (lifecycle events and error reports; never repo contents, paths, or secrets) |

## One config, one session

Credentials live in `~/.agent-cards/config.json` (0600). Signing in once covers both doors — companies are created from your account. An existing `~/.agent-cards-admin.json` session is adopted automatically the first time the unified CLI runs.
