Pi extensions that polish the daily experience.
- Credits: shows the active provider's credit balance or rate-limit usage in the status line.
- Editor: replaces the default editor with a compact working indicator (inspired by Amp) and current model info.
- Footer: shows session information, extension statuses, cost, and context usage on one line.
- Fullscreen: clears the screen and scrollback on session start, pins the editor and footer to the bottom for a full-screen session, and clears again on exit.
- Models: exposes a
modeltool so the agent can list the models the user can use currently and inspect the provider, model, and thinking level in use. - Name: exposes a
nametool so the agent can give the current session a concise, recognizable name in the session selector. - Presets: switches named model presets with
/preset,--preset, and quick cycle shortcuts. - Recap: generates a short idle-session recap and exposes a
/recapcommand for manual generation, inspired by Claude Code's session recap.
Install from npm:
pi install npm:pi-sparkFor local development from this repo:
pi install /path/to/pi-sparkSpark reads config from ~/.pi/agent/spark.json and from the current project’s .pi/spark.json. Project config overrides matching global fields.
All extensions are enabled by default. Set a specific extension to false to disable it, for example, "footer": false disables the footer extension.
Example:
{
"credits": false,
"editor": {
"spinner": "dots"
},
"footer": false,
"presets": {
"claude-opus": {
"provider": "anthropic",
"model": "claude-opus-4-8",
"thinkingLevel": "high"
},
"gpt": {
"provider": "openai-codex",
"model": "gpt-5.5",
"thinkingLevel": "medium"
}
},
"recap": {
"idle": "5m",
"provider": "openai-codex",
"model": "gpt-5.4-mini",
"thinkingLevel": "off"
}
}- pi-spark shows the active provider's credit balance or rate-limit usage in the status line.
- Supported providers: DeepSeek, Fireworks, Moonshot, OpenAI Codex, OpenRouter, and Vercel AI Gateway.
- Most provider-specific fetching approaches reference CodexBar. Fireworks is an exception: its balance lives behind an internal gRPC API, so the approach was reverse-engineered from the
firectlbinary — see docs/fireworks.md.
editor.spinnercontrols the working indicator style and can bedots,lights,tildes, orpulse.
- pi-spark replaces the footer with a compact one-line view of session metadata, extension statuses, cost, and context usage.
- pi-spark clears the screen and scrollback at session start and exit, pins the editor and footer to the bottom, and enables pi's
clearOnShrinkbehavior programmatically so pinned UI stays aligned after taller components close.
- The agent can call the
modeltool with two actions:active: gets the active provider, model, and thinking level.list: lists models with their metadata, with an optional Liqe (Lucene-like)queryover model fields andoffset/limitpaging.
- The agent can set or refresh the current session's name and optionally give a reason.
- Each key under
presetsdefines a named model preset withprovider,model, and optionalthinkingLevelfields.
Use presets in these ways:
- Select interactively with
/presetor/preset <key> - Start pi with a preset using
pi --preset <key> - Cycle presets with
ctrl+super+pandctrl+shift+super+p(superiscommandon macOS)
- pi-spark can generate a short recap after the session has been idle or when you run
/recapmanually. - The
recap.idlevalue sets how long the session must stay idle before a recap is generated. It accepts either a millisecond number or a human-readable duration string parsed by vercel/ms (e.g.,"3m","30s","2 minutes"), and must resolve to at least 5000ms. - The recap model can be customized with
provider,model, andthinkingLevel.
Pi 0.79.0 added a project trust dialog that asks before loading project-local resources (earendil-works/pi#5514), and pi 0.79.1 made the default behavior configurable via defaultProjectTrust. To keep startup minimal, set it to "always" in ~/.pi/agent/settings.json (or change it with /settings):
{
"defaultProjectTrust": "always"
}Project trust is an input-loading guard, so use "always" only if you trust the projects you open.

