Documentation Index
Fetch the complete documentation index at: https://mintlify.com/badlogic/pi-mono/llms.txt
Use this file to discover all available pages before exploring further.
Pi can create themes for you. Just ask it to build one for your setup.
Theme Locations
Pi loads themes from: Built-in:dark,light
~/.pi/agent/themes/*.json
.pi/themes/*.json
themes/directories in pi packagespi.themesentries inpackage.json
themesarray with files or directories
--theme <path>(repeatable)
--no-themes.
Selecting a Theme
- Interactive
- settings.json
Use
/settings and select your theme from the menudark or light.
Creating a Custom Theme
Hot reload: When you edit the currently active custom theme file, Pi reloads it automatically for immediate visual feedback.
Theme Format
name- Required, must be uniquevars- Optional reusable colorscolors- Required, must define all 51 tokens
$schema field enables editor auto-completion and validation.
Color Tokens
Core UI (11 colors)
Primary accent (logo, selected items, cursor)
Normal borders
Highlighted borders
Subtle borders (editor)
Success states
Error states
Warning states
Secondary text
Tertiary text
Default text (usually
"")Thinking block text
Backgrounds & Content (11 colors)
Selected line background
User message background
User message text
Extension message background
Extension message text
Extension message label
Tool box (pending)
Tool box (success)
Tool box (error)
Tool title
Tool output text
Markdown (10 colors)
| Token | Purpose |
|---|---|
mdHeading | Headings |
mdLink | Link text |
mdLinkUrl | Link URL |
mdCode | Inline code |
mdCodeBlock | Code block content |
mdCodeBlockBorder | Code block fences |
mdQuote | Blockquote text |
mdQuoteBorder | Blockquote border |
mdHr | Horizontal rule |
mdListBullet | List bullets |
Tool Diffs (3 colors)
| Token | Purpose |
|---|---|
toolDiffAdded | Added lines |
toolDiffRemoved | Removed lines |
toolDiffContext | Context lines |
Syntax Highlighting (9 colors)
| Token | Purpose |
|---|---|
syntaxComment | Comments |
syntaxKeyword | Keywords |
syntaxFunction | Function names |
syntaxVariable | Variables |
syntaxString | Strings |
syntaxNumber | Numbers |
syntaxType | Types |
syntaxOperator | Operators |
syntaxPunctuation | Punctuation |
Thinking Level Borders (6 colors)
Editor border colors indicating thinking level (visual hierarchy from subtle to prominent):| Token | Purpose |
|---|---|
thinkingOff | Thinking off |
thinkingMinimal | Minimal thinking |
thinkingLow | Low thinking |
thinkingMedium | Medium thinking |
thinkingHigh | High thinking |
thinkingXhigh | Extra high thinking |
Bash Mode (1 color)
Editor border in bash mode (
! prefix)HTML Export (optional)
Theexport section controls colors for /export HTML output. If omitted, colors are derived from userMessageBg.
Color Values
Four formats are supported:| Format | Example | Description |
|---|---|---|
| Hex | "#ff0000" | 6-digit hex RGB |
| 256-color | 39 | xterm 256-color palette index (0-255) |
| Variable | "primary" | Reference to a vars entry |
| Default | "" | Terminal’s default color |
256-Color Palette
- 0-15: Basic ANSI colors (terminal-dependent)
- 16-231: 6×6×6 RGB cube (
16 + 36×R + 6×G + Bwhere R,G,B are 0-5) - 232-255: Grayscale ramp
Terminal Compatibility
Pi uses 24-bit RGB colors. Most modern terminals support this:- iTerm2 (macOS)
- Kitty (Linux/macOS)
- WezTerm (cross-platform)
- Windows Terminal
- VS Code integrated terminal
Theme Variables
Usevars to define reusable colors:
- Maintain color harmony
- Try different base palettes
- Update colors globally
Tips
Start with a base palette
Start with a base palette
Use established color palettes for harmony:
- Nord
- Gruvbox
- Tokyo Night
- Dracula
- Solarized
vars and reference consistently.Consider your terminal background
Consider your terminal background
Dark terminals: Use bright, saturated colors with higher contrastLight terminals: Use darker, muted colors with lower contrast
Test thoroughly
Test thoroughly
Check your theme with:
- Different message types (user, assistant, custom)
- All tool states (pending, success, error)
- Markdown content (headings, code, quotes)
- Long wrapped text
- Thinking blocks at different levels
Use hot reload
Use hot reload
Select your theme, then edit the JSON file. Changes appear immediately without restarting Pi.
Match your terminal
Match your terminal
For best results, use colors that harmonize with your terminal’s color scheme.
VS Code Terminal
For accurate colors in VS Code, set:Example Themes
See the built-in themes for reference:dark.json
Built-in dark theme source
light.json
Built-in light theme source
Sharing Themes
Package themes for others: See Pi Packages for full details.Troubleshooting
Colors look washed out
Colors look washed out
Your terminal may not support 24-bit color. Check If not supported, consider switching to a modern terminal.
$COLORTERM:Theme not appearing
Theme not appearing
Ensure:
- File is in a discovered location
- Filename ends with
.json - JSON is valid (use the
$schemafor validation) - Theme name is unique
- All 51 color tokens are defined
Hot reload not working
Hot reload not working
Hot reload only works for the currently active theme. If you’re editing a different theme, select it first via
/settings.Validation errors
Validation errors
Use the
$schema field to enable validation in your editor:Next Steps
Customization
Explore all customization options
Pi Packages
Package and share themes via npm or git