Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

johnlindquist/pi-emphasis

Developer Tools

A Pi extension that renders assistant replies with colored status pills, icons, and highlighted labels for faster scanning.

243
7
TypeScript
MIT
3 days old

What it does

Pi Emphasis is an extension for the Pi coding terminal. It changes only how assistant replies are drawn: bracketed words such as [[Done]] and [[Failed]] become colored pills with icons, common headings and lead labels get an icon, and bold text, arrows, and tree lines are colored. Stored messages, copied text, and HTML exports keep the original Markdown, so the effect is purely visual in the terminal.

The extension ships its own reply_style guidance in Pi's system prompt, so the agent knows which pill words to use and how to present consequences and ownership. That section adds about 1,500 tokens to the prompt and appears only in Pi's terminal interface; print, JSON, and RPC runs do not receive it. No model is called and no network service is involved.

Quick start

You need Pi 1.5 or newer and git, because pi install clones the repository. Then install the extension from the README:

pi install git:github.com/johnlindquist/pi-emphasis

Run /reload in Pi or restart it. To try it without installing:

pi -e git:github.com/johnlindquist/pi-emphasis

Check rendering by asking Pi to reply with one line that uses [[Done]], [[Needs you]], [[Failed]], and [[Costs money]]. You should see four rounded pills in different colors, each with an icon. If your terminal lacks the needed glyphs, the terminal setup section includes a shell check and font installation steps via Homebrew or Nerd Fonts downloads.

Pills and labels

The word inside [[...]] selects both color and icon. Red words signal problems, yellow draws attention, green marks settled states, and solid red flags consequences such as [[Costs money]]. Cyan words describe the kind of work, while blue pills cover ownership and context. Labels can include detail, for example [[Passed 12/12]] or [[Failed: 3 tests]], and many synonyms map to the same pill. A label can be up to 32 characters.

Headings and bold lead labels from predefined lists, such as Finding, Risk, Plan, or Next, receive icons. Action lead-ins like Check: and Next: take icons anywhere in a line. Your own messages, inline code, fenced code, and escaped asterisks are left unchanged.

Constraints

A terminal that can draw Nerd Font symbols is needed for icons and rounded pill ends; without it, set PI_EMPHASIS_PILL_ICONS=0 and PI_EMPHASIS_ROUND_CAPS=0 to get plain chips. A terminal with color is also required, otherwise pills render in reverse video. The README notes testing only on macOS, specifically in Ghostty and the Herdr app. Some pill colors use your terminal's own palette, so their exact shades depend on your theme.

If you want custom styling rules, set PI_EMPHASIS_GUIDANCE=0; the drawing stays, but the built-in reply_style prompt section is omitted. To add words, icons, or synonyms, edit the tables at the top of index.ts. Development requires Bun and uses bun install and bun run check.

HotRepo's take

This is a small, focused extension rather than a standalone tool: its value depends on already using Pi. On the 2026-11-17 new-project snapshot it recorded 16 stars gained in about an hour, reaching 119 stars and 3 forks; that is a single short window, not evidence of sustained growth. The implementation is a single TypeScript file plus demo assets, with MIT licensing, so the scope is clear and the customization path is direct for users who want to tune the vocabulary.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

You might also like

  1. ZiChuanLan/pi-purgeA pi extension that swaps the coding agent's system prompt for your own file, so you can run controlled prompt experiments.JavaScript301
  2. Xpropel/Pi-RemoteMirror a running pi coding-agent session to a browser and control it from a phone over a self-hosted relay.TypeScript212
  3. nicobailon/pi-subagentsLets Pi coding sessions hand review, scouting and implementation to focused child agents, including parallel and background runs.TypeScript4,071
  4. nicobailon/pi-betterA Pi extension that rewrites prompts into expert-level briefs grounded in your actual code and files.TypeScript103
  5. ZiChuanLan/agent-purgeReplace or append the system prompt for several coding agents from one local persona, with reversible switches.JavaScript163