Pi
Run the Pi coding agent on Nebul models with an OpenAI-compatible endpoint in models.json.
Pi is a minimal terminal coding agent by Mario Zechner: a small core with extensions, skills, and packages on top. It supports many providers out of the box, and for anything else it accepts any OpenAI-, Anthropic-, or Google-compatible endpoint through a small config file. That includes Nebul.
Prerequisites
- Node.js 22.19 or later (for the npm install)
- A Nebul AI Studio account with API access
- An API key for your active project
- A model ID from the Model Catalog
Installation
On macOS or Linux:
curl -fsSL https://pi.dev/install.sh | shOr from npm:
npm install -g --ignore-scripts @earendil-works/pi-coding-agentVerify with pi --version, then start it in your project directory with pi.
Connect it to Nebul
Pi keeps custom endpoints in models.json, stored in its agent directory. Add a nebul provider:
{
"providers": {
"nebul": {
"baseUrl": "https://api.inference.nebul.io/v1",
"api": "openai-completions",
"apiKey": "${NEBUL_API_KEY}",
"models": [
{ "id": "zai-org/GLM-5.3" }
]
}
}
}Field notes:
apiselects the request format.openai-completionsis the Chat Completions format most tools use.apiKeyaccepts${NAME}environment-variable interpolation, a literal value, or a leading!commandfor secrets from a password manager.- Each entry under
modelsis a model you can select. Theidmust exactly match a catalog model ID.
Opening /model inside Pi reloads the file, so edits take effect without a restart.
Select the model
Run /model and search for nebul to pick your model. Press Ctrl+S on it to save it as the default for new sessions. Run /thinking to choose a reasoning level for models that support it; see Reasoning Models for what Nebul returns.
A model does not appear
Custom models load from models.json but stay unavailable in /model until Pi can resolve credentials. If your model is missing from the picker, check that NEBUL_API_KEY is set in the shell that started Pi, or put a literal key in the file while testing.
Troubleshooting
404on requests: the base URL must behttps://api.inference.nebul.io/v1, with the/v1suffix.- Model not found: the
idmust exactly match a catalog ID, including vendor prefix and casing. - Authentication works in one shell only: the key came from an environment variable. Environment variables must be present in the process that starts Pi.
Data and telemetry
Pi checks for updates on startup. To disable all startup network operations, including install and update telemetry:
export PI_OFFLINE=1To disable only the version check:
export PI_SKIP_VERSION_CHECK=1Model traffic goes only to the providers you configure. For how Nebul treats requests, see Privacy & Security.