Skip to content

Pi ​

An extensible terminal coding agent that lets you override built-in providers.

Set it up from a GUI instead

Prefer not to edit config files: use CC-Switch (Claude Code / Codex) or Magpie (one place for every agent).

Install ​

bash
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pi --version

Configure ​

Override the built-in openai provider in ~/.pi/models.json:

json
{
  "openai": {
    "baseUrl": "https://leekbox.ai/v1",
    "models": ["gpt-6-astra", "claude-sonnet-5"],
    "apiKeyEnv": "LEEKBOX_API_KEY"
  }
}

Store the key ​

Either put the same key in ~/.pi/auth.json, or export it:

bash
export LEEKBOX_API_KEY="sk-..."

Verify ​

bash
pi "summarise this repository in three lines"

Troubleshooting ​

SymptomFix
Still hits the official APImodels.json is not in the global path
401LEEKBOX_API_KEY not exported in this shell
404 modelModel id differs from your group's list

LeekBox — unified AI gateway