@dbaida/pi-builder
v0.1.12
Published
Personal Pi customization package that bootstraps a private editable config repository.
Downloads
1,687
Maintainers
Readme
pi-builder
Personal Pi customization package for Pi.
This package helps you keep a private, editable copy of your Pi customization setup while installing the runtime extension through npm.
Installation
Install the package in Pi:
pi install npm:@dbaida/pi-builderRestart Pi after installation, or run this inside Pi:
/reloadFirst run
On startup, pi-builder checks for GitHub CLI:
gh --version
gh auth statusIf gh is installed and logged in, pi-builder creates or reuses a private GitHub repository in your account named:
pi-builder-configThen it clones that private config repository to your global Pi agent directory:
~/.pi/agent/.pi-builder-configAfter the private repository is ready, pi-builder updates your global Pi settings so future loads use the editable local config repo instead of the public npm package:
npm:@dbaida/pi-builder → ~/.pi/agent/.pi-builder-configRestart Pi after this first-time switch so Pi loads the local package source.
If you use a custom Pi agent directory with PI_CODING_AGENT_DIR, the clone is created there instead:
$PI_CODING_AGENT_DIR/.pi-builder-configThe private config repo is initialized from:
https://github.com/dmytrobaida/pi-builder.gitYou can override the private repo name with:
PI_BUILDER_CONFIG_REPO_NAME=my-custom-pi-config piStatus widget
pi-builder shows a multiline widget below the editor with useful details:
pi-builder
local: version 0.1.3-udv-1, 2 file(s) changed
upstream: new version available: 0.1.4 (current 0.1.3)
gh: authenticated
path: ~/.pi/agent/.pi-builder-configRefresh or print the same information on demand:
/pi-builder statusCustomizing your private config
After first run, your editable config lives in:
~/.pi/agent/.pi-builder-configStart with the single pi-builder command:
/pi-builder helpUser customizations belong in the user/ directories:
user/extensions/ # custom Pi extensions
user/skills/ # custom skills
user/prompts/ # prompt templates
user/themes/ # themespi-builder protects its sealed runtime files from agent edits to reduce merge conflicts when you upgrade later. Ask Pi to place new custom code under user/ instead of editing the sealed package files.
The private config repo includes these guide files so users and agents do not need to search around:
AGENTS.md
CUSTOMIZE.md
user/README.mdCommands
Show help:
/pi-builder helpShow where the local config repository is stored:
/pi-builder repo-locationAsk Pi to extend your private config safely:
/pi-builder extend add a prompt template for reviewing pull requestsCreate starter customization files:
/pi-builder new-extension current-time
/pi-builder new-skill release-checklist
/pi-builder new-prompt review-pr
/pi-builder new-theme my-themeCopy global Pi resources into your private config repo:
/pi-builder sync-globalValidate your private config and reload Pi resources:
/pi-builder validateEdit your personal injected agent rules:
/pi-builder agentsRules are stored in user/AGENTS.md and injected into every session so you can define your own agent rules, code style, and preferences.
Commit, tag, and push local config changes to your private repo's main branch:
/pi-builder syncUse this command instead of raw git push for config changes so each private-repo push includes the required user-development tag. Before committing, pi-builder checks that your local config repo is up to date with origin/main and remote user-development tags so it does not create duplicate tags or push over changes from another machine.
Sync tags use this format:
<current-extension-version>-udv-<number>Example:
0.1.3-udv-1Merge the latest upstream pi-builder changes into your private config repo, tag the result, and push it automatically:
/pi-builder upgradeIf Git reports merge conflicts, pi-builder stops before pushing so you can resolve them.
Check common setup problems:
/pi-builder doctorRepeated workflow suggestions
If pi-builder notices you asking for a similar workflow repeatedly, it can ask whether you want to turn that workflow into a reusable skill, prompt, or extension under user/.
Updating
To update to the latest package version:
pi update npm:@dbaida/pi-builderOr update all installed Pi packages:
pi update --extensionsRestart Pi after updating, or run:
/reloadTroubleshooting
Check that Pi sees the package:
pi listIf pi-builder reports that GitHub CLI is missing, install it and restart Pi:
brew install ghIf pi-builder reports that GitHub CLI is not logged in, run:
gh auth loginIf the config repository was not cloned:
- Check the bottom status bar for the error message.
- Check that
gitandghare installed. - Check that
gh auth statussucceeds. - Run
/reloadinside Pi or restart Pi.
If Pi still loads the npm package after the private repository is ready, restart Pi and check your global Pi settings:
~/.pi/agent/settings.jsonThe packages list should contain your local config repo path instead of npm:@dbaida/pi-builder.
Security
Pi extensions run with your local user permissions. Only install Pi packages from sources you trust.
