A Pi TUI extension that adds a retro rock / band-room terminal UI to your coding session. Originally built as "Pi Control Deck", now rebranded with music-themed labels, multiple visual themes, and full Pi TUI API compliance.
| Widget | Default | Description |
|---|---|---|
| Active Session | visible | Model, provider, thinking level, mode, turn count |
| Setlist | visible | Tool execution progress, idle/active state |
| Command | Description |
|---|---|
/bocchi |
Open command palette (SelectList overlay) |
/bocchi-settings |
Toggle widgets, compact mode, render cards, aliases |
/bocchi-theme |
Switch visual theme |
/bocchi-status |
Show full status summary |
/bocchi-clear |
Remove all widgets and status labels |
/confirm |
Confirmation dialog overlay |
/danger |
Risk-themed confirmation |
/fetch |
BorderedLoader spinner demo |
The following old commands are preserved and toggleable via Settings:
/control, /deck, /deck-settings, /deck-theme, /deck-status, /clear-ui
Custom tool rendering for LLM-dispatched tools:
bocchi_statusβ Status info cards (βΉ β β β)bocchi_errorβ Error cards with suggestions (β BAD TAKE)bocchi_workβ Working progress cardsbocchi_confirmβ Confirmation required cards
- Command palette β Searchable SelectList with arrow keys and Esc
- Settings β SettingsList with keyboard toggle/save/cancel
- Theme selector β SelectList for visual theme switching
- Confirmation β Yes/No overlay for risky operations
- BorderedLoader β Spinner overlay with Esc-to-cancel
Switch anytime with /bocchi-theme β no restart needed.
Music/band terminology with rounded box cards:
- πΈ ACTIVE SESSION β context widget
- β£ SETLIST β workflow widget
- β‘ RIFF EXECUTION β tool call cards
- β CLEAN TAKE β result cards
- β BAD TAKE β error cards
- β AMP SETTINGS β settings overlay
- βΆ START TAKE? β confirmation dialog
- Working indicator: βͺ β© β« β¬
- Idle:
backstage| Running:live
Monochromatic rounded borders with stage terminology.
Original vibrant dark theme with simple borders.
Bare-bones mode β no extra labels, subtle separators only.
All themes respect the 80-column minimum. Every rendered line is passed through truncateToWidth(), wrapTextWithAnsi(), or visibleWidth().
Bocchi Deck uses a vertical Pi-native layout (no sidebar, no dashboard):
ββββββββββββββββββββββββββββββββββββββββ
β normal assistant/tool output stream β
ββββββββββββββββββββββββββββββββββββββββ€
β πΈ ACTIVE SESSION β β widget (1 line compact)
β β£ SETLIST β β widget (1 line compact)
ββββββββββββββββββββββββββββββββββββββββ€
β default Pi editor β
ββββββββββββββββββββββββββββββββββββββββ€
β mode:normal tools:idle bocchi:on β β status labels
ββββββββββββββββββββββββββββββββββββββββ
cp bocchi-deck.ts ~/.pi/agent/extensions/Then in Pi, run /reload.
git clone https://github.com/Anxiety471/bocchi-deck.git
cp bocchi-deck/index.ts ~/.pi/agent/extensions/bocchi-deck.ts
# or use with pi -e
pi -e ./bocchi-deck/index.tsbocchi-deck/
βββ index.ts # Main extension (single self-contained file)
βββ README.md # This file
βββ .gitignore
- Theme config (
BocchiThemeConfig) β Label maps, border styles, and color keys for each of the 4 themes ActiveContextWidgetβ Renders model/session info in 1 line (compact) or multi-lineWorkflowProgressWidgetβ Renders tool execution state in 1 lineshowCommandPalette()β SelectList overlay factoryshowSettingsOverlay()β SettingsList overlay factoryshowConfirmationOverlay()β Confirm dialog overlay factorydrawCard()β Renders rounded or simple bordered cards with title/contentContainerFromLinesβ Helper to render pre-computed lines as a TUI component
- β
render(width),invalidate(),handleInput(data)on every interactive component - β
truncateToWidth()/wrapTextWithAnsi()/visibleWidth()on every line - β
Theme from callbacks (
theme.fg()/theme.bg()) β no imports, no hardcoded colors - β
invalidate()rebuilds themed content on theme change - β
Built-in
SelectList,SettingsList,BorderedLoaderfrom@earendil-works/pi-tui - β Default editor preserved β no sidebar, no dashboard, no custom editor
- β Works at 80-column terminal width
State is kept in-memory via a BocchiState object. The extension reacts to Pi lifecycle events:
session_startβ Reinitialize statemodel_select/thinking_level_selectβ Update context infoturn_start/turn_endβ Track turnstool_execution_start/tool_execution_endβ Track tool progresstool_callβ Update mode labelbefore_agent_start/agent_endβ Working state
| Setting | Options | Default |
|---|---|---|
| Compact mode | on / off | on |
| Active Context widget | visible / hidden | visible |
| Workflow Progress widget | visible / hidden | visible |
| Footer status labels | visible / hidden | visible |
| Working indicator | visible / hidden | visible |
| Render cards | enabled / disabled | enabled |
| Alias commands | yes / no | yes |
Display status cards with icons. Parameters:
title(string) β Status titlemessage(string) β Status messagestatus(optional:info|success|warning|error)
Display error cards. Parameters:
errorType(string) β Error categoryerrorMessage(string) β Error descriptionsuggestion(optional string) β Fix suggestion
Display working progress. Parameters:
task(string) β Task descriptionprogress(optional string) β Progress info
Request user confirmation. Parameters:
title(string) β Dialog titledescription(string) β What's at stakeconfirmLabel/cancelLabel(optional strings)
- Pi v0.75.3+
- Node.js 22+
# Lint
npx biome check index.ts
# Type-check (requires Pi's dependencies)
cp index.ts ~/.pi/agent/extensions/bocchi-deck.ts
pi -e ~/.pi/agent/extensions/bocchi-deck.ts| Version | Notes |
|---|---|
| 2.0 | Rebranded from Pi Control Deck to Bocchi Deck. Added retro-rock, mono-stage themes. Rounded card rendering. Music-note working indicator. |
| 1.0 | Original Pi Control Deck with tokyo-night and pantheon themes. |
MIT β feel free to fork, modify, and share.