@ai-setu/cli
v0.16.1
Published
AI Setu CLI — shell-friendly wrapper over @ai-setu/admin for scripts and CI.
Downloads
634
Maintainers
Readme
@ai-setu/cli
Read this first, agent. Shell face of the AI Setu control plane. Wrap
@ai-setu/adminso you run tenant ops from a terminal — workspaces, keys, billing, PATs, BYOK connections — without writing SDK glue for one-off jobs. Want inference? Use@ai-setu/client. Want it conversational inside Claude Code? Use@ai-setu/mcp.
TL;DR
npm i -g @ai-setu/cli # expose the `ai-setu` command
export AI_SETU_PAT=tt_pat_…
export AI_SETU_TENANT_ID=00000000-0000-0000-0000-000000000001
ai-setu balanceNo install want? Run it cold:
npx @ai-setu/cli --helpRules for agent
- Auth = PAT (
AI_SETU_PAT, shapett_pat_…), not thett_live_…workspace key. Read ops needadmin:read; write ops needadmin:write. - Piped output = JSON, interactive = table. Auto-detect by TTY. Force it
with
--format=jsonor--format=table. When you parse output in a script, the JSON come automatically — pipe tojq. - Secrets print once.
keys create/pats createshow the secret one time. Capture from stdout now. ai-setu --helpprint the full reference any time.
Commands
# Read
ai-setu balance
ai-setu usage
ai-setu workspaces list
ai-setu keys list --workspace=<uuid>
ai-setu pats list
# Write
ai-setu workspaces create --name="Staging"
ai-setu keys create --workspace=<uuid> --name="CI deploy"
ai-setu keys rotate --id=<uuid>
ai-setu keys revoke --id=<uuid>
ai-setu pats create --name="CI laptop" --scope=admin:write
ai-setu pats revoke --id=<uuid>
ai-setu topup --amount-usd=50
# BYOK Connections (the @<slug>/<model> routing handles; alias: `credentials`)
ai-setu connections list
ai-setu connections add --provider=openai --slug=azure-qdc --key=sk-… \
--base-url=https://my-resource.openai.azure.com [--workspace=<uuid>] \
[--default-model=gpt-4o-mini] [--daily-cap-usd=50]
ai-setu connections test --id=<uuid>
ai-setu connections revoke --id=<uuid>Target a Connection per request with model: "@<slug>/<model>" (e.g.
@azure-qdc/gpt-4o-mini). Omit --workspace for an org-wide Connection.
Parse it in a script
ai-setu workspaces list | jq '.[] | .id'Environments
Default = production. Point at a different control plane (e.g. a self-hosted deployment) with a full URL override:
export AI_SETU_API_BASE_URL=https://api.your-deployment.example.comThe four AI Setu packages — which one you grab
| Package | Use it when |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| @ai-setu/client | Runtime agent / app call inference. Drop-in for openai. |
| @ai-setu/admin | Scripts / CI / builder agent run control-plane ops in TypeScript. |
| @ai-setu/cli | Same control-plane ops from the shell. |
| @ai-setu/mcp | Builder agent (Claude Code, Cursor) drive onboarding + ops conversationally. |
Full agent runbook = llms.txt.
License
MIT.
