1<!--
2SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
3
4SPDX-License-Identifier: CC0-1.0
5-->
6
7# pi-extensions
8
9A collection of [Pi](https://github.com/badlogic/pi-mono) extensions. They're
10all quite rough currently, having just been imported to this repo from ad-hoc,
11vibed individual scripts created by saying "go change
12`~/.config/pi/extensions/foo.ts` so it bars".
13
14## Packages
15
16### `@amolith/pi-handoff`
17
18[](https://www.npmjs.com/package/@amolith/pi-handoff)
19
20Get to the end of the thing you're doing, then use a lightweight subagent to
21extract particular bits from the current session and create a new one from those
22bits with `/handoff thorough goal description`. You can also tell Pi to hand
23something off (it has a tool).
24
25```sh
26pi install npm:@amolith/pi-handoff
27```
28
29> Based on [handoff.ts](https://github.com/pasky/pi-amplike/blob/main/extensions/handoff.ts)
30> and [session-query.ts](https://github.com/pasky/pi-amplike/blob/main/extensions/session-query.ts)
31> by Petr Baudis, licensed MIT accordingly. Reworked so the subagent calls a
32> tool instead of expecting it to produce well-formed JSON, added an auto-submit
33> countdown, and make the extraction model configurable via `PI_HANDOFF_MODEL`.
34
35### `@amolith/pi-personas`
36
37[](https://www.npmjs.com/package/@amolith/pi-personas)
38
39Drop markdown files in `$PI_CODING_AGENT_DIR/personas/` and switch between them
40with `/persona`. Lets your agent be a grumpy senior today and a patient tutor
41tomorrow. The active persona gets injected into the system prompt and persists
42across sessions until you change it.
43
44```sh
45pi install npm:@amolith/pi-personas
46```
47
48> All mine :)
49
50## Development
51
52Prerequisites: [mise](https://mise.jdx.dev/) (installs Node and npm automatically).
53
54```sh
55# Install dependencies
56npm install
57
58# Format, lint, and type-check everything
59mise run check
60```