@codewithkenzo/pi-theme-switcher
v0.1.3
Published
Switch and preview Pi themes during live sessions
Maintainers
Readme
Theme Switcher
@codewithkenzo/pi-theme-switcher — Runtime theme selection and preview for the Pi coding agent.
Part of the Pi Rig suite.
Theme Switcher lets the agent switch, preview, and cycle themes during a live session. It persists the active theme across restarts and injects current-theme context into each session.
Surfaces
| Type | Name | Purpose |
|------|------|---------|
| Tool | theme_set | Set the active theme by name |
| Tool | theme_list | List available themes |
| Tool | theme_preview | Preview a theme without committing |
| Command | /theme status | Show the current active theme |
| Command | /theme set <name> | Set the active theme |
| Command | /theme list | List available themes |
| Command | /theme preview <name> | Preview a theme |
| Command | /theme cycle | Cycle to the next theme |
Palette preview (compact)
accent · header · success · warning · error swatches (flat-square, no rounded corners).
| NF | Palette | Variant | Preview |
|---|---|---|---|
| | catppuccin-mocha | dark |
|
|
| catppuccin-latte | light |
|
|
| nord | dark |
|
|
| dracula | dark |
|
|
| tokyo-night | dark |
|
|
| electric-midnight | dark |
|
|
| cadet | dark |
|
|
| soho | dark |
|
|
| orchid | dark |
|
|
| storm | dark |
|
More palettes are available in runtime (/theme list) and the picker.
Architecture
index.ts Extension entry — registers tools, commands, session hooks
src/
types.ts TypeBox schemas + tagged errors
state.ts Active theme state (in-memory)
runtime.ts Theme application and validation
tools.ts theme_set, theme_list, theme_preview
commands.ts /theme command handler
picker.ts Interactive theme picker
lifecycle.ts Session restore and agent-end persistence
session.ts Theme context injection into session entries
renderers.ts Theme preview rendering
ui.ts TUI helpers
skills/
theme-switcher/
SKILL.md Bundled skill for agent contextKey patterns
- Session persistence — active theme is saved on
agent_endand restored onsession_start. - Context injection — current theme is injected into the session so the agent is always aware of the active state.
- Effect at boundaries — async operations use Effect-TS. All exits to the pi API surface use
Effect.runPromise.
Install
One command (published package)
pi install npm:@codewithkenzo/pi-theme-switcherAll Pi Rig extensions at once
Bun
bunx @codewithkenzo/pi-rig@latestnpm
npx @codewithkenzo/pi-rig@latestFrom source
bun run setup # full workspace
# or individually:
pi install ./extensions/theme-switcherPrerequisites
- Bun >= 1.3
- Pi coding agent installed and on your PATH
Development
cd extensions/theme-switcher
bun install
bun run build # runtime bundle for the Pi coding agent
bun run typecheck # typecheck
bun test # testsLinks
- Pi Rig suite — monorepo with all extensions, installer, and docs
- Pi coding agent — upstream runtime
- npm: @codewithkenzo/pi-theme-switcher
- Related: @codewithkenzo/pi-dispatch, @codewithkenzo/pi-gateway-messaging, @codewithkenzo/pi-notify-cron
