Pi Coding Agent Extensions|

Pi Coding Agent Extensions

Enhancing the terminal developer experience. Custom modules and interface utilities designed to make the Pi agent ecosystem more visible, persistent, and efficient.

Host: Pi Agent
Language: TypeScript / Node.js
Format: NPM Packages

pi-infobar

High-contrast, dual-row status line inspired by the Starship shell prompt.

This extension replaces Pi's default footer with a cleaner, information-dense layout. It prioritizes active context, model states, and cost metrics over low-value status labels like "idle" or "ready."

Installation

Install the extension permanently inside your Pi environment:

pi install npm:pi-infobar

Or test it immediately in your current terminal session without installing:

pi -e npm:pi-infobar
Pi Infobar visual representation in the terminal prompt
The two-row info bar replacing the standard Pi status line footer.

Interactive Layout Breakdown

Line 1 — Navigation + Model State

  • Current Directory: Styled as the primary segment, showing your active workspace path.
  • Git Worktree: Appends a green worktree tag showing the worktree root name if the current directory is a linked git worktree.
  • Git Status: Inline git branch name coupled with real-time status glyphs (~ modified, untracked, + staged, - deleted, ⇡/⇣ branch sync).
  • Model & Context: Displays the active model in light blue, thinking/effort levels in custom colors, and context window utilization percentage (transitions from green to yellow, orange, and red beyond 60%).

Line 2 — Usage + Session Cost

  • Subscription Usage: Tracks your active Codex subscription quotas and limits.
  • Token Metrics: Displays token transfer details ( sent, received) alongside estimated session cost (prefixed with a dark green $).

Extension Commands

Command Description
/pi-infobar Toggle the info bar footer visibility
/pi-infobar on | off Force enable or disable the info bar
/pi-infobar toggle Toggle the status line
/codex-status Output current Codex usage and rate-limit windows
/codex-status --refresh Force refresh usage stats from Codex APIs
/codex-status --no-statusline Print usage report without updating footer status
/codex-status --clear-statusline Remove Codex stats from the status line

worktree-sessions

Multi-worktree session synchronization for non-linear git workflows.

In standard environments, active AI developer sessions are confined to a single directory. worktree-sessions shares active AI agent sessions across different git worktrees of the same project, allowing you to switch branches/worktrees without losing context or interrupting your agent's history.

Architecture

The project is structured with clean separation of concerns, separating shared filesystem linking logic from specific runtime environments:

Shared Core

src/worktree-sessions.ts holds the reusable core logic for resolving git parent repositories and linking session caches.

Pi Adapter

pi/index.ts wires the shared module into Pi lifecycle hooks and exposes the /worktree-sessions command.

Build & Distribution

The package builds the TypeScript source using modern compilation pipelines, publishing minified JavaScript alongside corresponding .d.ts declarations from the dist/ directory.

Worktree sessions tree icon
Shared session linkage mapping across parallel git branches.

Command Interface

Toggle or query active session roots directly from the chat prompt:

/worktree-sessions
/worktree-sessions status