Pi Coding Agent
Use the Pi Coding Agent with Blackfuel as the inference backend via the pi-blackfuel extension
pi is a coding-agent CLI. The pi-blackfuel extension registers Blackfuel as a model provider inside pi, so you can drive pi's agent loop with any text-generation model served by Blackfuel.
The extension discovers models live: on startup it fetches the model list from Blackfuel's OpenAI-compatible GET /v1/models endpoint and registers each text-generation model under a blackfuel provider. New model releases show up automatically — there's no static list to maintain and nothing to edit when the catalog grows.
Prerequisites
- A Blackfuel API key (get one here)
- pi installed — see the pi install guide
Install the extension
Install pi-blackfuel directly from GitHub:
pi install git:github.com/blackfuel-ai/pi-blackfuelThe extension auto-discovers Blackfuel's models on the next pi startup — no /reload needed.
Authenticate
Log in from inside pi:
- Run
/login - Choose Use an API key
- Select Blackfuel
- Paste your key when prompted
pi keeps the key, so you only do this once.
pi stores the key in plain text in ~/.pi/agent/auth.json. On a shared machine, use the environment variable below instead to keep the key out of that file.
To use an environment variable instead, set your Blackfuel API key before launching pi:
export BLACKFUEL_API_KEY=bf_mykey_xxxxxxThe extension reads the key stored via /login first, then falls back to BLACKFUEL_API_KEY. Add the export line to your shell profile (~/.bashrc, ~/.zshrc) to persist it across sessions.
Verify and use
List the available models to confirm the Blackfuel catalog loaded:
pi --list-modelsThe models appear under the blackfuel provider. Select one with the model selector (Ctrl+P), or switch directly with /model blackfuel. Browse Available Models to pick the right one for your workflow.
Each model carries the details Blackfuel serves for it:
- Cost: the usage and cost pi shows in its footer and in
/sessionuse the model's Blackfuel per-token rates. - Thinking levels:
/thinkingoffers only the reasoning efforts the model accepts. - Deprecation: a deprecated model's name shows its sunset date and, when Blackfuel names one, the successor to move to, in the form
(deprecated, sunset YYYY-MM-DD, use <successor model ID>). See Model Lifecycle for the notice you get before a model is retired.