pi-ui-minimal

Minimal UI extension for Pi that hides footer info and removes dashed borders around the user input for a cleaner TUI experience.

Package details

extension

Install pi-ui-minimal from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-ui-minimal
Package
pi-ui-minimal
Version
1.1.1
Published
Apr 21, 2026
Downloads
254/mo · 10/wk
Author
rwese
License
MIT
Types
extension
Size
19.2 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Pi UI Minimal Extension

A minimal UI extension for Pi coding agent that provides a cleaner TUI experience by:

  1. Hiding the footer - Removes the default footer information (context size, model, tokens, cost)
  2. Removing dashed borders - Eliminates the horizontal dashed lines above and below the user input area

Installation

Place this extension in your Pi extensions directory:

cp -r /path/to/pi-ui-minimal ~/.pi/agent/extensions/

Usage

Once installed, the extension will automatically activate on session start. No additional configuration is required.

What It Does

Hides Footer

The extension replaces the default footer with an empty one, giving you more vertical space for content.

Removes Editor Borders

The default editor component renders with dashed lines:

──────────────
User input here
──────────────

This extension removes those borders:

User input here

Prompt Variables

The editor shows a bold prompt with customizable variables:

[main 14:30:45] my-app > Type your message here

Available variables:

Variable Description Example
%d Directory basename my-app
%D Full directory path /Users/me/Projects/my-app
%cf% Context fill percentage 45%
%gb% Git branch name main
%gs% Git status indicators *+~
%td% Time (HH:MM:SS) 14:30:45
%% Literal percent sign %

Git status indicators:

  • * - Modified files (unstaged)
  • + - Staged changes
  • ~ - Untracked files

Configuration

Environment Variable (PI_PS1)

Set the PI_PS1 environment variable to customize the prompt format:

export PI_PS1="%d > "           # Directory: "my-app > "
export PI_PS1="[%gb% %td%] %d > "  # Branch + time: "[main 14:30:45] my-app > "
export PI_PS1="%cf% %d > "       # Context %: "45% my-app > "
export PI_PS1="> "               # Simple prompt

Command (/prompt-prefix)

Use the /prompt-prefix command to set the prompt dynamically:

/prompt-prefix "%d > "
/prompt-prefix "%cf% %gb% > "
/prompt-prefix

Run /prompt-prefix without arguments to see the current prefix and all available variables.

Priority

  1. If PI_PS1 is set, it takes precedence
  2. Otherwise, uses saved prefix from ~/.config/pi-ui-minimal/config.json
  3. /prompt-prefix saves to config and persists across sessions

How It Works

The extension is split into two concerns:

FooterManager (extensions/FooterManager.ts)

  • createEmptyFooter() - creates an empty footer component
  • hideFooter() - installs the empty footer via ctx.ui.setFooter()

MinimalEditor (extensions/MinimalEditor.ts)

  • Extends CustomEditor to preserve all editor functionality
  • Overrides render() to strip the first and last lines (borders)
  • Maintains full autocomplete, history, and input handling

The entry point (extensions/index.ts) combines both modules on session_start.

Benefits

  • Cleaner interface - Less visual noise, more focus on content
  • More space - Extra vertical space without the footer and borders
  • Preserved functionality - All editor features remain intact
  • Minimal overhead - Simple implementation with no performance impact

Technical Details

  • Built with TypeScript for type safety
  • Extends the official CustomEditor class from @mariozechner/pi-coding-agent
  • Compatible with all Pi themes and configurations
  • Zero configuration required

License

MIT