integrations/sdk/AIgateway CLI
$_

AIgateway CLI + AIgateway

`aig` — call any model, mint keys, run evals, tail traffic from your terminal.

One binary that wraps the entire aggregator surface. `aig init` walks you through getting a key, drops it in your environment, and scaffolds a starter file. From there: `aig call`, `aig models`, `aig sub-account create`, `aig eval run`, `aig tail`, `aig mcp call` — every primitive without writing curl by hand.

AIgateway CLI homepage →
Setup

Three steps or fewer.

STEP 01

Install

Node 18+. Use it once via npx, or install globally if you'll lean on it daily. Provides the `aig` binary.

npx aigateway-cli init
# or
npm i -g aigateway-cli && aig init
STEP 02

First call

Streams to stdout. Try a different model by changing the slug.

aig call moonshot/kimi-k2.6 "explain edge inference in 50 words"
aig call anthropic/claude-opus-4.7 "rewrite the above more tightly"
STEP 03

List the live catalog

aig models --modality text
aig models --modality image | head
aig models --json > catalog.json
STEP 04

Mint a per-customer key

aig sub-account create acme-corp \
  --cap 50000 --rpm 300 --tag acme
STEP 05

Tail live traffic

Streams the last 100 requests across your org, then watches new ones live. Useful in incidents.

aig tail --filter status=error
STEP 06

Inspect MCP from the shell

Useful for debugging an MCP integration without booting an agent.

aig mcp tools                        # list tools
aig mcp call list_models             # call one
Notes
  • Config lives at ~/.config/aigateway/config.json (mode 0600). Override the key with the AIGATEWAY_API_KEY env var.
  • Working examples: github.com/aigateway-sh/examples · bug reports: github.com/aigateway-sh or support@aigateway.sh.
More integrations

Same key. Every other tool.