# CLI

The CLI lives in the DoorOps repo under `packages/cli`. Use Bun or Node 22+.

```bash
cd packages/cli
bun install
bun run doorops --help
```

1. Create an API key in Settings → Developers
2. `doorops auth login` with your tenant base URL and key
3. `doorops whoami`

| Command | What it does |
| --- | --- |
| `doorops auth login` | Store base URL and key after a successful ping |
| `doorops auth status` | Show org context without printing the key |
| `doorops auth logout` | Remove local credentials |
| `doorops whoami` | Ping and show token abilities |
| `doorops customers list` | Optional `--search`, `--page` |
| `doorops customers get <id>` | One customer |
| `doorops customers create --name=...` | Create |
| `doorops sites list` | Optional `--customer` |
| `doorops sites get <id>` | One site |
| `doorops sites create --customer= --name=...` | Create on a customer |
| `doorops mcp url` | Print the tenant MCP URL |
| `doorops docs` | Open the public developer hub |

For chat agents, use [MCP](/docs/developers/mcp) instead of stuffing a key into a prompt.
