pi-cyber-ui
v0.1.23
Published
Standalone Pi UI package with a cyber-inspired theme, custom editor, footer, and lightweight working indicator.
Readme
pi-cyber-ui
A standalone Pi package that bundles a cyber-inspired editor, compact footer, compact tool rendering, and lightweight working indicator together with a matching dark theme.
The visual direction was inspired by Tokyo Night, but this is a new project with its own palette, naming, and packaging structure.
The extension is split into small modules for easier maintenance:
editor.tswires editor/session eventscyber-editor.tsowns the pure prompt shell and prompt markereditor-state.tshandles session state and token accountingworking.tsrenders prompt progress and idle summariesfooter.tsrenders cwd, git dirty state, model, thinking level, and context usagetool-render.tsre-registers built-in tools with compact cyber renderers while delegating execution to Pi built-insread-compact.tspreserves Pi read compact compatibility for skills and agent resource filestool-registry.tstracks tool lifecycle, durations, and per-turn talliespath-utils.tscontains shared path shortening/styling helperstoken-usage.tscontains protocol-aware exact/estimated token helpers
Contents
themes/cyber-ui-dark.json— Pi themeextensions/pi-cyber-ui/index.ts— extension entrypointextensions/pi-cyber-ui/editor.ts— editor/session event wiringextensions/pi-cyber-ui/editor-state.ts— editor/session stateextensions/pi-cyber-ui/cyber-editor.ts— Cyber editor shellextensions/pi-cyber-ui/token-usage.ts— token usage helpersextensions/pi-cyber-ui/footer.ts— compact footerextensions/pi-cyber-ui/working.ts— working line and idle summary widgetextensions/pi-cyber-ui/tool-render.ts— compact built-in tool rendererextensions/pi-cyber-ui/read-compact.ts— Pi read compact compatibility layerextensions/pi-cyber-ui/tool-registry.ts— tool timing/tally registryextensions/pi-cyber-ui/path-utils.ts— path display helpers
Local development
cd ~/Developer/pi-cyber-ui
npm install
npm run typecheckUsing with Pi
Install from the remote repository:
pi install git:github.com/22GNUs/pi-cyber-ui.gitFor local development, you can also install from a local checkout path:
pi install /path/to/pi-cyber-uiThe package is structured to be publishable later via git or npm without changing the directory layout.
When it is published, install it with one of these forms:
pi install npm:pi-cyber-ui
# or
pi install git:github.com/22GNUs/pi-cyber-ui.gitArchitecture contract
This package is not a full tool implementation fork. Built-in tools are re-registered to control the UI, but execution and prompt metadata continue to come from Pi's native tool definitions.
- Inherited from Pi native tools:
execute, parameter schemas, descriptions, prompt snippets, and prompt guidelines. - Customized by this package:
renderCall,renderResult, compact summaries, duration/spinner display, and cyber color semantics. - Consequence: Pi execution-layer improvements usually apply automatically; Pi native renderer improvements do not. Renderer-specific features must be reviewed and ported when Pi changes.
- Compatibility rule: preserve known Pi compact read affordances where they affect semantics, especially
SKILL.mdas[skill] nameand agent resource files (AGENTS.md/CLAUDE.md) as compact resource reads. - Maintenance rule: after upgrading
@earendil-works/pi-coding-agent, review Pi's built-in renderers, especiallycore/tools/read, before publishing.
Commands
This package does not register commands.
Notes
- Package name:
pi-cyber-ui - Theme name:
cyber-ui-dark - Extension entrypoint:
extensions/pi-cyber-ui/index.ts - Exact streaming usage is protocol-aware; Anthropic Messages API can surface cumulative in-flight usage, while other APIs fall back to estimates
- Working indicator uses Pi's official
ctx.ui.setWorkingIndicator()/ctx.ui.setWorkingMessage()APIs - Built-in tools are re-registered for compact rendering while preserving their original execution behavior and prompt metadata
- Theme format follows the official Pi theme schema
