pi-peacock
Peacock-style workspace coloring, repo badges, and terminal titles for pi coding agent
Package details
Install pi-peacock from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-peacock- Package
pi-peacock- Version
0.1.0- Published
- Mar 24, 2026
- Downloads
- 30/mo · 6/wk
- Author
- metmirr
- License
- MIT
- Types
- extension, theme
- Size
- 29.7 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions"
],
"themes": [
"./themes"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-peacock
Peacock-style workspace coloring for pi coding agent.
pi-peacock is for people who work in multiple repos or multiple pi sessions and want each workspace to be instantly recognizable, similar to the VS Code Peacock extension.
It gives pi a repo identity by:
- switching to a repo-specific theme
- showing a colored repo badge in the footer
- setting the terminal title to the current repo and branch
So instead of every pi session looking the same, your backend repo can feel orange, your frontend blue, your extension purple, and so on.
What this package is for
If you regularly work across:
- multiple git repos
- a monorepo with several apps
- staging vs production workspaces
- client projects in separate terminals
then pi-peacock helps you distinguish them at a glance without relying on memory or terminal tab names alone.
It is especially useful when you often have several pi windows open at once.
What it changes
pi-peacock changes pi's own UI identity, not your editor or terminal theme globally.
It can:
- apply a different pi theme per repo
- show a persistent footer/status badge
- set the terminal title
It does not try to recolor your terminal application's native window chrome, since that is terminal-dependent and not reliably portable.
Features
- automatic repo coloring with zero config
- stable theme assignment by hashing the git repo name
- bundled themes ready to use out of the box
- per-repo overrides via
peacock.json - project + global config support
- publishable pi package for npm/git installs
Included themes
peacock-amberpeacock-bluepeacock-cyanpeacock-greenpeacock-purplepeacock-rose
These themes are tuned for dark terminals and make border/accent differences obvious without being overly noisy.
Install
From npm
pi install npm:pi-peacock
From git
pi install git:github.com/metmirr/pi-peacock
From a local checkout
pi install ./pi-peacock
Try without installing
pi -e ./pi-peacock
Quick start
You can use pi-peacock with no config at all.
Once installed, it will:
- detect the current git repo
- pick one of the bundled themes
- apply that theme consistently for that repo
- show repo + branch information in pi's UI
If you want fixed mappings, add a config file.
Configuration
pi-peacock looks for config in:
~/.pi/agent/peacock.json<git-root>/.pi/peacock.json
Project config overrides global config.
Minimal config
{
"rules": [
{ "repo": "nearbygpt-backend", "theme": "peacock-amber", "label": "backend" },
{ "repo": "nearbygpt-pwa", "theme": "peacock-blue", "label": "pwa" },
{ "repo": "chrome-extension", "theme": "peacock-purple", "label": "extension" },
{ "repo": "mapsense-app", "theme": "peacock-green", "label": "mapsense" }
]
}
Full config
{
"autoAssignTheme": true,
"fallbackTheme": "dark",
"fallbackLabel": "workspace",
"showBranch": true,
"showStatus": true,
"showTitle": true,
"titlePrefix": "π",
"rules": [
{
"repo": "nearbygpt-backend",
"theme": "peacock-amber",
"label": "backend",
"title": "π {label} · {branch}",
"status": "backend"
},
{
"pathIncludes": ["/work/client-a/", "/work/client-b/"],
"theme": "peacock-cyan",
"label": "client-work"
}
]
}
Rule fields
Each rule can contain:
repo: exact git repo folder namepathIncludes: string or array of substrings matched againstcwdand git roottheme: theme name to switch tolabel: short name used for footer/titletitle: custom title templatestatus: custom footer label/template
Available placeholders in title and status:
{repo}{branch}{label}{cwd}{gitRoot}
Command
/peacock
Re-applies the current repo identity and shows which theme/config source is active.
Useful when:
- you changed config and want to refresh
- you manually switched themes and want pi-peacock to take over again
- you want to verify which rule matched
NearbyGPT example
An example config for this monorepo is included at:
examples/nearbygpt-peacock.json
Package structure
This package ships with:
extensions/repo-peacock.ts— the pi extensionthemes/*.json— bundled peacock themesexamples/nearbygpt-peacock.json— sample repo mapping config
Publish
Publish to npm
npm publish
Publish as a pi package on GitHub
After pushing the repo to GitHub, users can install it directly with:
pi install git:github.com/metmirr/pi-peacock
The package already includes the pi-package keyword so it is ready to be distributed as a pi package.
Notes
- If no rule matches,
pi-peacockauto-picks one of the bundled themes. - If you switch git branches during a session, the footer/title updates after the current turn.
- If you manually change theme in pi,
pi-peacockwill re-apply when identity changes or when you run/peacock.