Skip to navigation

ast gateway

Route this machine's Claude Code through your organization's AI Gateway
View as Markdown

Route this machine’s Claude Code through your organization’s AI Gateway, so its usage appears in your organization’s Insights.

ast gateway <subcommand>

Claude Code keeps your existing login and billing. gateway connect writes two settings to your Claude Code user settings and records exactly what it changed, so gateway disconnect can put them back.

gateway connect

Connect this machine to the AI Gateway for an account.

ast gateway connect [--account <name>] [--replace-existing]

Running connect again replaces this machine’s key. A machine reports to one account at a time.

Without a terminal, connect never replaces another gateway or another account’s connection unless you pass --replace-existing.

FlagDescription
--account <name>Account to connect to (default: the active account)
--replace-existingReplace another gateway or account’s connection without asking

gateway status

Show whether this machine routes through the AI Gateway.

ast gateway status

gateway devices

List your devices that are connected to the AI Gateway.

ast gateway devices [--all]

--all lists every member’s devices. It requires permission to manage data sources.

gateway revoke

Revoke one of your devices’ keys, by key prefix or ID.

ast gateway revoke <key> [--all]

--all revokes any member’s device key. It requires permission to manage data sources.

gateway disconnect

Restore your Claude Code settings to how they were before connect, then revoke this machine’s key.

ast gateway disconnect

The command restores the settings first, so disconnect works even when the server can’t be reached.

Next steps

  • Claude Code: stream Claude Code usage telemetry from your team into Astropods
  • AI Gateway: use Astropods-provided LLM access without managing your own provider keys