Themes are JSON files that define colors for Pi’s terminal UI. Pi ships with two built-in themes —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/earendil-works/pi/llms.txt
Use this file to discover all available pages before exploring further.
dark and light — and auto-selects based on your terminal background on first run. You can create custom themes, switch between them via /settings, and edit the active theme file to see changes instantly.
Theme locations
Pi loads themes from these locations:| Location | Scope |
|---|---|
| Built-in | dark, light |
~/.pi/agent/themes/*.json | Global (all projects) |
.pi/themes/*.json | Project-local |
themes/ in Pi packages | Via installed packages |
settings.json:
--theme <path> on the CLI to load a theme for a single run. Disable theme discovery with --no-themes.
Selecting a theme
Switch themes via/settings in interactive mode, or set in settings.json:
dark or light.
Creating a custom theme
Hot reload
When you modify the currently active custom theme file, Pi reloads it automatically. Changes apply immediately without restarting Pi or running/reload. This makes it easy to iterate on colors while Pi is running.
Theme format
nameis required and must be unique.varsis optional. Define reusable color values and reference them by name incolors.colorsmust define all 51 required tokens. There are no optional colors.
Color tokens
Every theme must define all 51 color tokens across these categories:Core UI (11 tokens)
Core UI (11 tokens)
| Token | Purpose |
|---|---|
accent | Primary accent (logo, selected items, cursor) |
border | Normal borders |
borderAccent | Highlighted borders |
borderMuted | Subtle borders (editor) |
success | Success states |
error | Error states |
warning | Warning states |
muted | Secondary text |
dim | Tertiary text |
text | Default text (usually "") |
thinkingText | Thinking block text |
Backgrounds and content (11 tokens)
Backgrounds and content (11 tokens)
| Token | Purpose |
|---|---|
selectedBg | Selected line background |
userMessageBg | User message background |
userMessageText | User message text |
customMessageBg | Extension message background |
customMessageText | Extension message text |
customMessageLabel | Extension message label |
toolPendingBg | Tool box (pending) |
toolSuccessBg | Tool box (success) |
toolErrorBg | Tool box (error) |
toolTitle | Tool title |
toolOutput | Tool output text |
Markdown (10 tokens)
Markdown (10 tokens)
| 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 tokens)
Tool diffs (3 tokens)
| Token | Purpose |
|---|---|
toolDiffAdded | Added lines |
toolDiffRemoved | Removed lines |
toolDiffContext | Context lines |
Syntax highlighting (9 tokens)
Syntax highlighting (9 tokens)
| 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 tokens)
Thinking level borders (6 tokens)
The editor border color indicates the active thinking level. 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 token)
Bash mode (1 token)
| Token | Purpose |
|---|---|
bashMode | Editor border color when in bash mode (! prefix) |
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 foreground or background |
HTML export colors
The optionalexport section controls colors for /export HTML output. If omitted, colors are derived from userMessageBg.
Tips
- Dark terminals: use bright, saturated colors with higher contrast.
- Light terminals: use darker, muted colors with lower contrast.
- Color harmony: start with a base palette (Nord, Gruvbox, Tokyo Night), define it in
vars, and reference it consistently. - Testing: check your theme with different message types, tool states, markdown content, and long wrapped text.
- VS Code: set
terminal.integrated.minimumContrastRatioto1for accurate colors.
Sharing themes
Add athemes/ directory to a Pi package to share themes via npm or git:
Related
Pi packages
Bundle and share themes via npm or git.
Extensions
Access and switch themes programmatically from extensions.