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
Install Pi
Install @earendil-works/pi-coding-agent and create an API key in your SacredGPT account.
Terminalnpm i -g @earendil-works/pi-coding-agent@latest pi --versionAdd SacredGPT to models.json~/.pi/agent/models.json
Create ~/.pi/agent/models.json with the ready-made settings below and paste your key.
Pick a model
Run pi and choose the model with /model, or pass it as a flag.
Terminalpi --model sacredgpt/sacredai-heretic
Ready-made settings
Replace sg_live_… with your key. For free SacredAI, use the sacredgpt-auto model.
{
"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.
