omp packages

@mightguy/pi-ui1.9.0

Custom pi terminal UI with themes, layout, and message rendering

mightguy Published 15 days ago MIT ~651 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-ui

Custom Terminal UI for pi Coding Agent
Beautiful themes, smart status bar, and enhanced message rendering


πŸ“‹ Features

  • πŸŽ›οΈ Editor user zone β€” the prompt area becomes a styled zone with 4 presets (droid, gemini, cli-dock, nvim): model, thinking level, context meter, git branch with +/- LOC, response speed, and token usage rendered right around your input β€” ported from pi-droid-styling
  • 🧰 Tool badges β€” boxed badges for bash, read, write, edit, grep, find, and ls that collapse to a single row when the call finishes (click a row or press Ctrl+O to open it), with elapsed time, output size, a side-by-side split diff for edits, and a reasonix compact-row mode optional
  • πŸ’¬ Message styling β€” β€’ assistant prefix, muted thinking with a live collapsed-tail view, boxed compaction/skill/branch blocks, and full-width bands for code blocks and quotes (no rail characters, so selections copy the text alone); user messages stay plain (optional ❯ prefix and turn dividers in config)
  • 🧭 Table of contents β€” /toc lists your prompts (with a filter) and jumps the transcript to the one you pick; needs fullscreen TUI mode
  • 🎯 Focus mode β€” /final (or alt+g) collapses the transcript to just the final response and restores on a second trigger; needs fullscreen TUI mode
  • 🌈 Gradient startup β€” 9-row gradient "pi" logo derived from your theme accent, key hints, ready indicator, and OSC 11 terminal background sync so the whole window matches the theme
  • πŸ–₯️ Custom Status Bar β€” real-time footer showing model, thinking level, cwd, git branch, context usage (%), and API cost (used when the custom editor is off)
  • 🎨 Catppuccin Dark Theme β€” Dark theme based on Catppuccin Mocha with 64+ color mappings
  • ⏳ State-aware Working Loader β€” braille spinner with labels that follow the work (Working / Thinking / Answering / Running), elapsed time, and adaptive greenβ†’yellowβ†’red tone when the stream stalls
  • 🌟 Compact Startup β€” Gradient pi logo with key hints and a one-line β—† Resources … summary (expandable into System & Context / Available Tools tables) instead of pi's full resource listing
  • βš™οΈ Zero-config β€” sensible defaults, optional config at ~/.pi/agent/pi-ui.json
  • πŸ”Œ Zero Dependencies β€” Pure peer-dependency package; no additional npm packages required
  • ⚑ TypeScript Native β€” Loaded directly via jiti β€” no build step needed

πŸ“¦ Installation

pi install npm:@mightguy/pi-ui

Or from GitHub:

pi install git:github.com/might-guy106/pi-ui

πŸš€ Usage

Once installed, pi-ui works automatically β€” no configuration required. On session start the editor zone, footer, spinner, welcome screen, and message renderer are all registered.

Pick an editor style in ~/.pi/agent/pi-ui.json:

{ "userZoneStyle": "gemini" }

Editor styles

Style Look
gemini (default) One-line divider, status row, half-block framed input, one-line footer
droid Host rule [user@host] ==, metadata rows, bold divider
cli-dock Outlined input box with placeholder + single aligned status line
nvim Lined input with branch label in the rule + reverse-video statusline bar

See docs/editor-styles.md for previews and docs/configuration.md for every option.

Working Loader

Braille spinner (⣷⣯⣟⑿Ⓙ⣻⣽⣾) with a state label and elapsed time:

Answering... 󰅐 12.4s

Table of contents

/toc

Filter your prompts and jump the transcript to one of them. See docs/table-of-contents.md.

Focus mode

/final   (or alt+g)

Collapse everything except the final response; trigger again to restore. See docs/final-response.md.

🎨 Themes

/theme catppuccin-dark

πŸ—οΈ Project Structure

pi-ui/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts     # Extension entry
β”‚   β”œβ”€β”€ ui.ts        # Session setup β€” header, editor, footer, loader, events
β”‚   β”œβ”€β”€ config.ts    # ~/.pi/agent/pi-ui.json config
β”‚   β”œβ”€β”€ loader.ts    # Working loader (spinner + state labels + tone)
β”‚   β”œβ”€β”€ footer.ts    # Legacy standalone footer (fallback)
β”‚   β”œβ”€β”€ footer-patch.ts # Footer data capture for the editor zone
β”‚   β”œβ”€β”€ startup.ts   # Gradient logo header + compact resource summary
β”‚   β”œβ”€β”€ editor/      # BoxEditor + style presets + cluster helper
β”‚   β”œβ”€β”€ tools/       # Tool badges, collapse decisions, split diff, presentation styles
β”‚   β”œβ”€β”€ navigation/  # `/toc` transcript table of contents, `/final` focus mode
β”‚   β”œβ”€β”€ messages/    # Prefixes, boxed blocks, code/quote bands, streaming seam
β”‚   β”œβ”€β”€ startup.ts   # Gradient pi logo header + clean startup
β”‚   β”œβ”€β”€ core/        # git status, response speed
β”‚   β”œβ”€β”€ theme/       # ANSI toolkit, theme extras, OSC 11 background sync
β”‚   └── perf/        # Profiler (PI_UI_PROFILE=1)
β”œβ”€β”€ themes/
β”‚   └── catppuccin-dark.json
β”œβ”€β”€ scripts/         # Smoke tests (npm test)
β”œβ”€β”€ docs/            # Docs β€” start at docs/index.md
└── .github/
    └── workflows/
        └── release.yml

πŸ› οΈ Development

See docs/index.md for the documentation map, docs/development.md for the dev and publishing workflow.

Credits

This project is a fork of DragonYH/pi-ui, originally published as @rokiy/pi-ui.

The welcome screen is ported from pi-kaush/pi-welcome-screen by the same author.

The editor user zone, working loader, and theme tooling are ported from sting8k/pi-droid-styling β€” see docs/porting-notes.md.

πŸ“„ License

MIT


Built for the pi coding agent ecosystem