omp packages

pi-bash-status-color0.1.0

Color Pi's Bash command titles by success or failure without replacing the built-in result renderer

firechickenmp4 Published 3 days ago MIT ~0 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-bash-status-color

A small Pi extension that colors the built-in Bash command title by its final state:

State Command title
Running toolTitle
Successful success
Failed, interrupted, or rejected error

The command output, exit-code message, elapsed time, truncation warnings, and expand/collapse behavior stay with Pi's built-in Bash renderer. Long commands wrap normally. Other tools are untouched.

Requirements

  • Pi coding agent 1.7.0 or a compatible version with registerToolRenderer()
  • Node.js 22.19 or later for running the development tests

Install

pi install npm:pi-bash-status-color

Restart Pi or run /reload after installation.

To try the package without adding it to your settings:

pi -e npm:pi-bash-status-color

From a local checkout:

pi -e ./src/index.ts

Theme integration

The extension uses the active theme's toolTitle, success, error, and muted tokens. It does not add configuration or change any theme files.

If you prefer borderless tool output, a custom Pi theme may use the terminal default background by setting toolPendingBg, toolSuccessBg, and toolErrorBg to "". This is optional and affects every tool, not only Bash.

Implementation notes

The extension wraps only the built-in Bash renderCall slot. It delegates to that renderer first, preserving its timer setup and component reuse, then changes the title text. The built-in renderResult and renderShell are inherited unchanged.

Pi's HTML export renders calls as partial output, so exported command titles retain the neutral toolTitle color.

Another extension that also rewrites the Bash renderCall slot can override this package's title text, depending on extension load order. Do not load multiple Bash title renderers together unless their composition is known to work.

Development

npm install
npm test
npm run test:coverage
npm pack --dry-run

License

MIT