{"_id":"@apat183/pi-buddy","_rev":"3-674e59fccd363ffaf2d2af097f153398","name":"@apat183/pi-buddy","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@apat183/pi-buddy","version":"0.1.0","keywords":["pi-package","pi","pi-extension","pi-coding-agent","coding-agent","tui","widget","header","mascot","ascii"],"author":{"name":"Anand","email":"apat183@gmail.com"},"license":"MIT","_id":"@apat183/pi-buddy@0.1.0","maintainers":[{"name":"apat183","email":"apat183@gmail.com"}],"homepage":"https://github.com/apat183/pi-buddy#readme","bugs":{"url":"https://github.com/apat183/pi-buddy/issues"},"pi":{"image":"https://raw.githubusercontent.com/apat183/pi-buddy/main/media/demo.gif","extensions":["./index.ts"]},"dist":{"shasum":"f397eace7555fff653c7d8528a59425cd871b217","tarball":"https://registry.npmjs.org/@apat183/pi-buddy/-/pi-buddy-0.1.0.tgz","fileCount":12,"integrity":"sha512-i9WXscebMTOn64n7mi+hSkzwxkcaHo6Go1cronb1oibPi3pQiUv9cm1Sd028mD/i/aqFATSrHDY/HvrVJiIS2w==","signatures":[{"sig":"MEYCIQC1RkBv2QPlsi4EMSw72fCGaBlFZVSZ0Jddg8zKXcMpwgIhALSeGHjWnPlN7g04HfvXt8dxDFpaXjgaG5LD08QtfChK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37438},"type":"module","engines":{"node":">=22"},"gitHead":"a99470355208729e3e8676cfb6a43fdc2376a796","scripts":{"test":"node --test tests/*.test.ts","check":"npm run typecheck && npm test","dev:on":"pi remove npm:@apat183/pi-buddy || true; pi install \"$PWD\"","dev:off":"pi remove \"$PWD\" || true; pi install npm:@apat183/pi-buddy","typecheck":"tsc --noEmit"},"_npmUser":{"name":"apat183","email":"apat183@gmail.com"},"repository":{"url":"git+https://github.com/apat183/pi-buddy.git","type":"git"},"_npmVersion":"11.13.0","description":"An animated π mascot for pi — a launch header, a live state widget beside your editor, and a custom spinner. Configurable placement and alignment.","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","@types/node":"^24.13.3","@earendil-works/pi-tui":"^0.82.1","@earendil-works/pi-coding-agent":"^0.82.1"},"peerDependencies":{"@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-buddy_0.1.0_1785116494618_0.1810566018680575","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@apat183/pi-buddy","version":"0.1.1","keywords":["pi-package","pi","pi-extension","pi-coding-agent","coding-agent","tui","widget","header","mascot","ascii"],"author":{"name":"Anand","email":"apat183@gmail.com"},"license":"MIT","_id":"@apat183/pi-buddy@0.1.1","maintainers":[{"name":"apat183","email":"apat183@gmail.com"}],"homepage":"https://github.com/apat183/pi-buddy#readme","bugs":{"url":"https://github.com/apat183/pi-buddy/issues"},"pi":{"image":"https://raw.githubusercontent.com/apat183/pi-buddy/main/media/demo.gif","extensions":["./index.ts"]},"dist":{"shasum":"3c28c02ca836a6c1c4842480adb53a25548f058f","tarball":"https://registry.npmjs.org/@apat183/pi-buddy/-/pi-buddy-0.1.1.tgz","fileCount":12,"integrity":"sha512-0NZGM3CFfLg4nQ5JxmkVzegfcQ/kP3WVn09Ita+wtnWOEOVQ1dICMMoFVIvivSzgASKbJkXUrt2LUwWPoBZRug==","signatures":[{"sig":"MEYCIQCVsqZ7nOlA93DRS5pOWJ8hH0DYe/yrIOcJBY2V/XyH6gIhAL1tcfxvyAXQyjI4nCLPoT3jJNMKKDBXgVG2OuUDIvVT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@apat183%2fpi-buddy@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":37674},"type":"module","engines":{"node":">=22"},"gitHead":"051a328f96daee78f6db9ec636124dda0cf76ca7","scripts":{"test":"node --test tests/*.test.ts","check":"npm run typecheck && npm test","dev:on":"pi remove npm:@apat183/pi-buddy || true; pi install \"$PWD\"","dev:off":"pi remove \"$PWD\" || true; pi install npm:@apat183/pi-buddy","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:aba68523-5651-469a-975a-4a3435023abb"}},"repository":{"url":"git+https://github.com/apat183/pi-buddy.git","type":"git"},"_npmVersion":"11.16.0","description":"An animated π mascot for pi — a launch header, a live state widget beside your editor, and a custom spinner. Configurable placement and alignment.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","@types/node":"^24.13.3","@earendil-works/pi-tui":"^0.82.1","@earendil-works/pi-coding-agent":"^0.82.1"},"peerDependencies":{"@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-buddy_0.1.1_1785117048290_0.7440005165104036","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@apat183/pi-buddy","version":"0.1.2","description":"An animated π mascot for pi — a launch header, a live state widget beside your editor, and a custom spinner. Configurable placement and alignment.","type":"module","keywords":["pi-package"],"license":"MIT","author":{"name":"Anand","email":"apat183@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/apat183/pi-buddy.git"},"bugs":{"url":"https://github.com/apat183/pi-buddy/issues"},"homepage":"https://github.com/apat183/pi-buddy#readme","engines":{"node":">=22"},"publishConfig":{"access":"public"},"pi":{"extensions":["./index.ts"],"image":"https://raw.githubusercontent.com/apat183/pi-buddy/main/media/demo.gif"},"scripts":{"typecheck":"tsc --noEmit","test":"node --test tests/*.test.ts","check":"npm run typecheck && npm test","dev:on":"pi remove npm:@apat183/pi-buddy || true; pi install \"$PWD\"","dev:off":"pi remove \"$PWD\" || true; pi install npm:@apat183/pi-buddy"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*","@earendil-works/pi-tui":"*"},"devDependencies":{"@earendil-works/pi-coding-agent":"^0.82.1","@earendil-works/pi-tui":"^0.82.1","@types/node":"^24.13.3","typescript":"^7.0.2"},"gitHead":"1f103ebe72db076ef8d491f83b5dc0f979037aa9","_id":"@apat183/pi-buddy@0.1.2","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-P4MYR0qO0epVANAz8FYb8aSpBk1cSbdyMDmkC14MYhN5aElK4RW0B4W895f2fA5LwfhIsip3ceU8Rt5Ae2kHxQ==","shasum":"f5398b94423a60894b5184c8825d658aec9e7895","tarball":"https://registry.npmjs.org/@apat183/pi-buddy/-/pi-buddy-0.1.2.tgz","fileCount":12,"unpackedSize":38096,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@apat183%2fpi-buddy@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDIupvvMD5fSVMlFTMUHC0qb2KTOLbiEzj++gkhV4X/ywIhAIn3F6ioSiyVP00MUT+MnQUEI3A38TM8AXtFUJSxnjz/"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:aba68523-5651-469a-975a-4a3435023abb"}},"directories":{},"maintainers":[{"name":"apat183","email":"apat183@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-buddy_0.1.2_1785225230272_0.5019452840593457"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-27T01:41:34.404Z","modified":"2026-07-28T07:53:50.703Z","0.1.0":"2026-07-27T01:41:34.755Z","0.1.1":"2026-07-27T01:50:48.451Z","0.1.2":"2026-07-28T07:53:50.421Z"},"bugs":{"url":"https://github.com/apat183/pi-buddy/issues"},"author":{"name":"Anand","email":"apat183@gmail.com"},"license":"MIT","homepage":"https://github.com/apat183/pi-buddy#readme","keywords":["pi-package"],"repository":{"type":"git","url":"git+https://github.com/apat183/pi-buddy.git"},"description":"An animated π mascot for pi — a launch header, a live state widget beside your editor, and a custom spinner. Configurable placement and alignment.","maintainers":[{"name":"apat183","email":"apat183@gmail.com"}],"readme":"# pi-buddy\n\nAn animated π mascot for [pi](https://pi.dev). It adds a launch header, a small\ncompanion beside your editor that reacts to what the agent is doing, and a\nmatching working spinner. Everything is configurable and remembered between\nsessions.\n\n![pi-buddy in action](https://raw.githubusercontent.com/apat183/pi-buddy/main/media/demo.gif)\n\n## Install\n\n```bash\npi install npm:@apat183/pi-buddy\n```\n\nThen `/reload`, or restart pi.\n\nTo try it without installing:\n\n```bash\npi -e npm:@apat183/pi-buddy\n```\n\n## What it does\n\n- **Launch header** — a banner with the mascot, the active model and the pi\n  version, replacing pi's default header.\n- **Buddy widget** — three little rows beside your editor. The eyes animate and\n  the label changes with the agent's state:\n\n  | State | Shown when |\n  | --- | --- |\n  | `ready` | idle, waiting for you |\n  | `thinking` | the model is streaming |\n  | `reading` | a read-ish tool is running |\n  | `searching` | grep / glob / symbol search / LSP navigation |\n  | `writing` | write / edit / patch |\n  | `running command` | bash and friends |\n  | `working` | any other tool |\n  | `done!` | a tool just finished |\n  | `uh-oh` | a tool failed |\n\n- **Working spinner** — pi's streaming indicator becomes animated π frames.\n\nThe extension is TUI-only. In `--print`, JSON and RPC modes it does nothing at\nall, so it is safe to leave installed for scripted runs.\n\n## Commands\n\n| Command | What it does |\n| --- | --- |\n| `/buddy` | print the current settings |\n| `/buddy config` | interactive settings picker |\n| `/buddy on` / `/buddy off` | show or hide the buddy |\n| `/buddy align left\\|right` | which side of the terminal the buddy hugs |\n| `/buddy place above\\|below` | position relative to the editor |\n| `/buddy header on\\|off` | custom launch header |\n| `/buddy spinner on\\|off` | custom working spinner |\n| `/buddy reset` | restore defaults |\n\n`/buddy header-reset` is kept as an alias of `/buddy header off`.\n\nArguments tab-complete. Every change applies immediately and is saved — no\nrestart needed.\n\n## Alignment\n\nThe status label mirrors to the *inner* side of the mascot, so it always reads\ninward from the edge it is docked to:\n\n```text\n/buddy align left\n╭─ π ─╮\n│ • • │  thinking\n╰─┬─┬─╯\n\n/buddy align right                       terminal edge ┐\n                                            ╭─ π ─╮    │\n                                 thinking   │ • • │    │\n                                            ╰─┬─┬─╯    │\n```\n\nOn a terminal too narrow for both, the label is dropped rather than clipping\nthe mascot.\n\n`align` is horizontal and handled by this extension; `place` is vertical and\nmaps to pi's own `aboveEditor` / `belowEditor` widget placement.\n\n## Configuration file\n\nSettings live in `~/.pi/agent/pi-buddy/config.json` and are written whenever you\nchange something with `/buddy`:\n\n```json\n{\n  \"enabled\": true,\n  \"align\": \"right\",\n  \"placement\": \"belowEditor\",\n  \"header\": true,\n  \"spinner\": true\n}\n```\n\n- `enabled` is the master switch — turning it off removes the widget, the\n  header and the custom spinner.\n- Unknown keys are ignored and invalid values fall back to their default, so a\n  hand-edited file can never stop pi from starting. A file that is not valid\n  JSON is reported once and replaced by the defaults on the next write.\n\n## Compatibility\n\nTested against **pi 0.82.x** on Node 24 (Node ≥ 22 required). The package\ndeclares `@earendil-works/pi-coding-agent` and `@earendil-works/pi-tui` as\npeer dependencies with a `*` range, per the\n[pi packages guide](https://pi.dev/docs/latest/packages) — it always uses the\ncopies bundled with your pi installation and ships no runtime dependencies of\nits own.\n\n## Development\n\n```bash\ngit clone https://github.com/apat183/pi-buddy\ncd pi-buddy\nnpm install\nnpm run check          # tsc --noEmit + node --test\n\nnpm run dev:on         # load the working copy into pi instead of the published one\n# edit, then /reload inside pi\nnpm run dev:off        # switch back to the published package\n```\n\nReleases are automated: `npm version patch && git push --follow-tags` builds\nand publishes from GitHub Actions using npm trusted publishing (OIDC), with\nprovenance. Then `pi update --extensions` picks it up.\n\nTo re-record the demo (requires [vhs](https://github.com/charmbracelet/vhs)):\n\n```bash\n./media/record.sh\n```\n\nIt runs against a throwaway agent directory, so the recording shows only this\nextension and none of your local configuration.\n\n## Notes\n\n- The mascot idea comes from pi's own\n  [`examples/extensions/custom-header.ts`](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/examples/extensions/custom-header.ts).\n- Unrelated to the [`pi-buddy`](https://www.npmjs.com/package/pi-buddy) package\n  on npm by NerfEko, which is a different (and much larger) companion\n  extension. This one is deliberately small: one mascot, no roster, no model\n  calls.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}