My personal pi agent config repo.
It keeps prompts/extensions/skills/themes/reminders plus repo-managed pi config files (settings, keybindings, etc.) in version control and bootstraps them into ~/.pi/agent.
- Node.js ≥ 22.19.0 — see Installing Node.js
- pi — see Installing pi
macOS (Homebrew):
brew install nodeOr install via mise or fnm if you want a version manager for Node.
Linux — install via your package manager (apt, dnf, etc.), mise, or fnm.
Verify:
node --version # should be ≥ 22.19.0Install pi globally with npm:
npm install -g @earendil-works/pi-coding-agentVerify:
pi --versionFrom this repo root:
npm install
npm run setupThe theme follows your terminal appearance: pi switches between the
github-colorblind-light and github-colorblind-dark variants automatically.
npm install provides the pinned dependencies used by the extensions and their tests. The reconciliation script itself still uses only Node.js built-ins.
extensions/footer-veil.ts starts each session with model information and provider usage
veiled. Press Ctrl+P to show or hide them; context statistics are never veiled. Provider usage covers both the
footer status slots and the below-editor widget lines used by hypercharm
and Better OpenAI (in its status footer mode). No per-provider
commands are used; the veil filters at render time, so provider updates stay
hidden until you reveal them with Ctrl+P. Reloads and new/resumed/forked sessions restore the
initially veiled state.
extensions/skill-guide.ts renders every loaded skill command with a short summary in a TUI-only widget when a session starts. The widget is not added to the conversation or sent to the model provider. It hides whenever you submit a prompt; use /skill-guide to reopen it until your next prompt.
Configure it in extensions/skill-guide.ts (DEFAULT_SKILL_GUIDE_CONFIG, then /reload):
title— widget heading text ("Skill index"by default).showOnStartup— whether the index is shown when a session starts.hideOnPrompt— whether the index hides whenever an interactive prompt is submitted.placement—aboveEditororbelowEditor.maxSummaryLength— maximum summary length before shortening (30 characters by default).summaryOverrides— replacements for unclear upstream descriptions, keyed by skill name.hiddenSkills— skills hidden by exact name or"prefix*"glob (["fabric-*"]by default).pinnedSkills— skills always shown, even under a glob ([]by default, sofabric-*stays fully hidden).
extensions/desktop-notifications.ts requests terminal focus reporting and sends an attention notification only when Pi's terminal surface is known to be unfocused. It notifies for the final agent_settled lifecycle event (Pi is waiting for you). The waiting notification is debounced by ~10s: if a new agent run starts within the window (auto-retry, compaction retry, queued follow-up), the settle was transient, so nothing is sent. Unknown focus is treated conservatively as focused, so unsupported or headless sessions stay silent.
Ghostty is the primary path on both Linux and macOS: CSI mode 1004 reports exact surface focus, and OSC 777 raises the native desktop notification. The extension also supports Kitty's OSC 99 protocol. When no native notification protocol is recognized, it falls back to notify-send on Linux or osascript on macOS. If no terminal focus report has arrived, focus detection falls back to X11's active window when DISPLAY and WINDOWID are available, or the frontmost terminal application on macOS. Terminal reports take precedence over these best-effort fallbacks.
The npm:pi-fabric package is installed with its fabric-exec skill and runs in full code mode (fabric.json): the model writes one awaited code block against the pi.*/tools.* APIs instead of chaining many small tool calls. Subagents are disabled (approvals.agent: "deny", agents.enabled: false); mesh, memory, and the Fabric UI widget are off. MCP is enabled through mcp.json, with allowlisted Exa web-search/fetch, TinyFish search/fetch, and Context7 documentation tools. Oversized results are spilled to disk artifacts once output passes executor.maxOutputChars (8,192 chars), keeping context lean; maxNestedResultChars stays at 2M since nested results never reach the model.
npm run setup runs bootstrap.mjs, which:
-
Clears all repo-managed paths under
~/.pi/agent/(prompts, skills, reminders, APPEND_SYSTEM.md, keybindings.json, extensions/, themes/) — stale symlinks and files are cleaned out before re-creation. -
Symlinks directories and files into
~/.pi/agent:prompts/skills/reminders/keybindings.json
-
Installs the repository-owned
APPEND_SYSTEM.mdas~/.pi/agent/APPEND_SYSTEM.md. -
Symlinks extension and theme directories from the repo into
~/.pi/agent:extensions/→~/.pi/agent/extensions/themes/→~/.pi/agent/themes/
-
Installs JSON config files (full replacement — the repo file becomes the target file). If a source file is later removed from the repo, re-running setup removes the corresponding target:
settings.json→~/.pi/agent/settings.jsonpi-better-openai.json→~/.pi/agent/extensions/pi-better-openai.jsonfabric.json→~/.pi/agent/fabric.jsonmcp.json→~/.pi/agent/mcp.json
-
Links both theme variants —
github-colorblind-light.jsonandgithub-colorblind-dark.jsonare linked into~/.pi/agent/themes/; pi follows the terminal's light/dark appearance automatically.
Paths this repository does not declare are never touched, so leftovers from removed packages, renamed configuration, or earlier bootstrap versions stay on disk after setup. Delete ~/.pi, rerun setup, and reload Pi for a large configuration change (AGENTS.md rule 5).
bootstrap.mjs— setup/link/merge scriptAGENTS.md— agent-facing rules for this repository, loaded automatically by pi sessions started in this repositoryprompts/— prompt filesextensions/— pi extensionsextensions/skill-guide.ts— TUI skill-index widget, toggled with/skill-guide(settings live inDEFAULT_SKILL_GUIDE_CONFIGat the top of the file)extensions/footer-veil.ts—Ctrl+Pfooter veil for model info and provider usage widgetsextensions/git-editor-guard.ts— stops git from spawning an interactive editor inside agentbashcallsextensions/max-reasoning.ts— raises the thinking level to any reasoning model’s highest supported level on model select/start (the runtime clamps “max” to the model’s top;EXCLUDED_FAMILIESopts models out)
skills/— pi skillsthemes/— pi themes (github-colorblindlight/dark variants)reminders/— global reminder definitions forpi-system-remindersAPPEND_SYSTEM.md— repository-owned system prompt overlay rules installed into~/.pi/agent/during reconciliationsettings.json— repo-managed pi settings, including installed packages/extensionskeybindings.json— repo-managed keybinding overrides; unbinds the built-in commands that useCtrl+Psofooter-veilcan ownCtrl+Pfabric.json— Pi Fabric configuration installed into~/.pi/agent/fabric.json(see Pi Fabric)mcp.json— Pi Fabric MCP server configuration installed into~/.pi/agent/mcp.jsontests/— Vitest suites for extensions and reconciliation behavior, run withnpm test
The bootstrap script is plain Node.js; the pi extensions in extensions/ are TypeScript.
Reminder files tracked in reminders/ become global reminders via ~/.pi/agent/reminders; project-specific reminders for some other repo should still live in that repo's .pi/reminders/ directory.
Re-run npm run setup any time you change files in this repo or set up a new machine. Reconciliation is offline — no network access is required.
bootstrap.mjs resolves the repo from the script location, so it works even if you invoke it outside the repo root.
All JSON config files (settings.json, pi-better-openai.json, fabric.json, and mcp.json) are fully replaced on every npm run setup — the repo file is written wholesale over the target. Any local pi settings not tracked in this repo will be overwritten.
If a JSON source file is removed from the repo, re-running setup deletes the corresponding target file.