# Link

URL: https://docs.hanzo.ai/docs/cli/link

> The `hanzo auth link` commands.

Also for this capability: [API](https://docs.hanzo.ai/docs/openapi/link) · **CLI** · [MCP](https://docs.hanzo.ai/docs/mcp-tools/link) · [SDKs](https://docs.hanzo.ai/docs/sdks)

The unified AI login manager's registry: the org+user-scoped record of WHICH provider accounts (Claude Max, ChatGPT Plus, a Hanzo API key, a raw provider key) a developer has signed into, ON WHICH MACHINES, with each account's latest usage snapshot.

[API reference →](https://docs.hanzo.ai/docs/openapi/link)

```bash
hanzo auth link list
```

Every command takes `--json` for the raw response and `--help` for its own flags. Sign in once with `hanzo auth login`; the commands below use that session, and the org they act in is the one it carries.

| Command                    | What it does                                                |
| -------------------------- | ----------------------------------------------------------- |
| `hanzo auth link create`   | Registers a signed-in AI provider account on a machine.     |
| `hanzo auth link get <id>` | Reads one linked account.                                   |
| `hanzo auth link list`     | Lists your linked accounts and the devices they sit on.     |
| `hanzo auth link rm <id>`  | Logs out one account and stops the sessions it was running. |
| `hanzo auth link route`    | Gets the failover order across your linked accounts.        |

### Devices

| Command                                    | What it does                                                  |
| ------------------------------------------ | ------------------------------------------------------------- |
| `hanzo auth link devices get <machine>`    | Shows one machine: its accounts, usage and live sessions.     |
| `hanzo auth link devices revoke <machine>` | Logs out every account on one machine and stops its sessions. |

### Usage

| Command                          | What it does                                                       |
| -------------------------------- | ------------------------------------------------------------------ |
| `hanzo auth link usage accounts` | Breaks down what the gateway routed through each of your accounts. |
| `hanzo auth link usage create`   | Reports usage samples from the device collector.                   |
| `hanzo auth link usage get`      | Shows one provider account's own usage dashboard.                  |
| `hanzo auth link usage summary`  | Shows plan consumption and Hanzo spend side by side.               |
