My personal pi agent config repo.
It keeps prompts/extensions/skills/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 setupnpm 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 ([]by default).pinnedSkills— skills always shown, even under a glob ([]by default).
git:github.com/kitevi/pi-nudge sends a native desktop notification when Pi's terminal surface is unfocused at 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.
Focus detection uses CSI mode 1004 reports where the terminal supports them, with X11's active window or the frontmost macOS application as best-effort fallbacks. Delivery is delegated to node-notifier — Notification Center on macOS, toasts on Windows, notify-send on Linux — so no terminal-emulator notification protocol is required.
settings.json sets codemode.mode to only and enables codemode, grep, find, and ls beside the default read, bash, edit, and write tools. The model reaches those tools through one codemode script. Pi's tool-search extension stays disabled. MCP servers in mcp.json are hidden except the Context7, TinyFish, and Exa tools scripts call. extensions/codemode-output-cap.ts keeps the model-facing codemode return to 10,000 characters: a longer return is written once to a private temp file, or Pi's existing spill is reused, and the visible text keeps the start and the end with that path in the omission hole, inside the budget. npm:@sting8k/pi-vcc replaces Pi's summarizer with an algorithmic one (pi-vcc-config.json). extensions/settle-compact.ts compacts once the agent settles with context use at or above 90% of the model window, so compaction lands between tasks; Pi's own threshold (contextWindow - compaction.reserveTokens) stays as the mid-run safety net.
npm run setup runs bootstrap.mjs, which:
-
Clears each repo-managed path under
~/.pi/agent/(prompts, skills, reminders, APPEND_SYSTEM.md, keybindings.json) before re-creating it — stale symlinks and files are cleaned out first. -
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 the repo's extension files into
~/.pi/agent/extensions/, and prunes repo-owned symlinks whose source file left the repository. Regular files this repo does not declare — such as the model-order statepi-model-sortwrites — are left in place. -
Installs JSON config files (full replacement — the repo file becomes the target file, written atomically). If a source file is later removed from the repo, re-running setup copies the target to
<target>.bakand then removes it:settings.json→~/.pi/agent/settings.jsonpi-better-openai.json→~/.pi/agent/extensions/pi-better-openai.jsoncoralbricks.json→~/.pi/agent/extensions/coralbricks.jsonmcp.json→~/.pi/agent/mcp.jsonmodels.json→~/.pi/agent/models.jsonpi-vcc-config.json→~/.pi/agent/pi-vcc-config.json
Paths this repository does not declare are never touched, except repo-owned symlinks inside ~/.pi/agent/extensions/, which are pruned when their source file leaves the repository. Leftovers from removed packages, renamed configuration, or earlier bootstrap versions otherwise 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/codemode-output-cap.ts— caps the model-facing codemode return at 10,000 characters and spills the complete return to one temp file, with the path in the omission holeextensions/disable-opencode-zen.ts— replaces the built-inopencodeprovider's models with an empty list, so/modelandpi --list-modelsdrop OpenCode Zen whileopencode-gokeepsOPENCODE_API_KEYextensions/xai-quota-guard.ts— hides pi-grok'sx_searchtool, and onxai-oauthmodels refuses prompts and aborts running loops once SuperGrok weekly usage reaches 80% (QUOTA_LIMIT_PERCENT), so other Grok clients keep the rest; warns and lets turns through when the unofficial billing endpoint cannot be readextensions/settle-compact.ts— compacts once the agent settles with context use at or above 90% (SETTLE_COMPACT_PERCENT); skips aborted runs and runs with queued messagesextensions/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 skillsreminders/— global reminder definitions forpi-system-reminders;hbm-companion.tspoints to the companion.hbm.xmlmapping when a Hibernate-mapped Java entity is readAPPEND_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+Pmcp.json— Pi MCP server configuration installed into~/.pi/agent/mcp.json(see Codemode)coralbricks.json—pi-coralbricks-providersettings installed into~/.pi/agent/extensions/coralbricks.json; turns cache-optimized pricing (X-Coral-Pricing: cache-optimized) on by default, soctrl+alt+ctoggles are reset by the nextnpm run setupmodels.json—opendesignprovider (amr-link): Chat Completions againsthttps://amr-link.open-design.ai/v1, keyed by$OPENDESIGN_API_KEY, exposing the DeepSeek V4.1 Flash 1017 checkpoint asdeepseek-v4.1-flash(seedocs/opendesign.md)pi-vcc-config.json— pi-vcc compaction settings installed into~/.pi/agent/pi-vcc-config.json; pi-vcc writes every compaction summarydocs/— provider runbooksdocs/opendesign.md— how to add or change anopendesignmodel: field mapping, thecontext_budgettrap, reasoning compat, and the missing-provider diagnosis
tests/— 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, coralbricks.json, mcp.json, models.json, and pi-vcc-config.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 backs the target up to <target>.bak and deletes it. *.bak files are gitignored.