← Catalog

@codewithkenzo/pi-theme-switcher

Switch and preview Pi themes during live sessions

Theme

Install

Install with PiG

pig install npm:@codewithkenzo/pi-theme-switcher

Install with Pi

pi install npm:@codewithkenzo/pi-theme-switcher
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./dist/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.8 (README.md). PiG does not review it.

Theme Switcher

npm Bun Effect TypeScript

@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.

Quick demo

Theme Switcher demo

Shows live preview, theme changes, and session-aware runtime theming in action.

Surfaces

TypeNamePurpose
Tooltheme_setSet the active theme by name
Tooltheme_listList available themes
Tooltheme_previewPreview a theme without committing
Command/theme statusShow the current active theme
Command/theme set <name>Set the active theme
Command/theme listList available themes
Command/theme preview <name>Preview a theme
Command/theme cycleCycle to the next theme

Palette preview (compact)

accent · header · success · warning · error swatches (flat-square, no rounded corners).

NFPaletteVariantPreview
catppuccin-mochadark#89b4fa #cba6f7 #a6e3a1 #f9e2af #f38ba8
catppuccin-lattelight#1e66f5 #8839ef #40a02b #df8e1d #d20f39
norddark#88c0d0 #5e81ac #a3be8c #ebcb8b #bf616a
draculadark#bd93f9 #bd93f9 #50fa7b #f1fa8c #ff5555
tokyo-nightdark#7aa2f7 #bb9af7 #9ece6a #e0af68 #f7768e
electric-midnightdark#8B5CF6 #E4E4E7 #3B82F6 #8B5CF6 #DC2626
cadetdark#7D39EB #F5F4EE #C6FF33 #C6FF33 #FF6B6B
sohodark#C4A7E7 #EA9A97 #9CCFD8 #F6C177 #EB6F92
orchiddark#81A1C1 #81A1C1 #A3BE8C #DFCA9A #E8A4CC
stormdark#7AA2F7 #BB9AF7 #9ECE6A #E0AF68 #F7768E

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 context

Key patterns

  • Session persistence — active theme is saved on agent_end and restored on session_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

pi install npm:@codewithkenzo/pi-theme-switcher

Or install all Pi Rig extensions at once:

bunx @codewithkenzo/pi-rig@latest
From source
bun run setup
# or individually:
pi install ./extensions/theme-switcher

Prerequisites

Development

cd extensions/theme-switcher
bun install
bun run build       # runtime bundle for the Pi coding agent
bun run typecheck   # typecheck
bun test            # tests