Introducing the AI Stats CLI
Browser OAuth, device code, key management, guardrails, and workspaces now have a first-party terminal workflow.
We now have a first-party aistats CLI for AI Stats.
This release gives both humans and agents a direct terminal path into the AI Stats control plane, instead of forcing everything through the dashboard.
Install
Install the CLI
Choose your package manager, then copy the command.
npm install -g @ai-stats/cliWhat it does
The CLI is built for the real workflows we already use internally:
- sign in with AI Stats browser OAuth
- fall back to device code for SSH, remote shells, and headless agents
- inspect your current grant with
whoami - create and manage regular API keys and management keys
- manage workspaces, presets, settings, and guardrails
- use first-party CLI OAuth while user-created OAuth apps remain in private testing
- inspect models, providers, pricing, credits, activity, analytics, and generations
Built on the shared OAuth stack
This is not a one-off auth shim.
We built the CLI on the same shared OAuth/OIDC foundations that will also back user-created OAuth apps:
- authorization code + PKCE
- device authorization grant
- refresh and revoke flows
- consent and workspace-aware grants
- OIDC discovery and JWKS
That matters because it keeps first-party CLI login and future third-party app auth moving in the same direction instead of diverging into separate systems.
Two login paths
aistats login now offers: