Terminal Agent

Connect Pi

A minimal terminal agent (pi.dev). Add SacredGPT with a single file, ~/.pi/agent/models.json.

Verified on Pi v0.83.0+ (~/.pi/agent/models.json, api: openai-completions).

Step by step

  1. Install Pi

    Install @earendil-works/pi-coding-agent and create an API key in your SacredGPT account.

    Terminal
    npm i -g @earendil-works/pi-coding-agent@latest
    pi --version
  2. Add SacredGPT to models.json~/.pi/agent/models.json

    Create ~/.pi/agent/models.json with the ready-made settings below and paste your key.

  3. Pick a model

    Run pi and choose the model with /model, or pass it as a flag.

    Terminal
    pi --model sacredgpt/sacredai-heretic

Ready-made settings

Replace sg_live_… with your key. For free SacredAI, use the sacredgpt-auto model.

~/.pi/agent/models.json
{
  "providers": {
    "sacredgpt": {
      "baseUrl": "https://sacredgpt.pro/v1",
      "api": "openai-completions",
      "apiKey": "sg_live_…",
      "models": [
        {
          "id": "sacredai-heretic",
          "name": "SacredAI Heretic",
          "contextWindow": 128000,
          "maxTokens": 16384
        },
        {"id": "sacredgpt-auto", "name": "SacredAI"}
      ]
    }
  }
}

If it doesn't work

The model is listed but requests hang

Make sure baseUrl ends with /v1 and api is openai-completions. Upgrade Pi to 0.83.0 or later.

Models show as unavailable

Pi can't find the key. Put it in models.json or auth.json, or pass --api-key.

No API key yet?

The API is included in your chat plan. SacredAI and 10 Heretic requests are free.

Create a key
Direct line

Found a bug? Show us.

Tell us what happened and what you expected. The page address and browser details help us reproduce it faster.