Configuration

trm uses TOML files for configuration, combining Ghostty's terminal settings with trm-specific features.

File Locations

config.toml (global)

Looked up in this order:

  1. ~/.config/trm/config.toml
  2. $XDG_CONFIG_HOME/trm/config.toml
  3. Platform-native config dir (e.g., ~/Library/Application Support/trm/config.toml on macOS)

A default config.toml is created automatically on first launch.

Session files

Looked up in this order:

  1. Explicit CLI argument: trm --config path/to/session.toml
  2. ./trm.toml in the current working directory
  3. ~/.config/trm/trm.toml
  4. Falls back to [[panes]] in config.toml

This means you can drop a trm.toml in any project directory and trm will automatically load it when launched from that directory.


[font]

Typography settings for all terminal panes. Only in config.toml.

[font]
family = "SF Mono"         # Font family name
size = 14.0                # Font size in points
line_height = 1.2          # Line height multiplier (1.0 = tight)
letter_spacing = 0.0       # Extra horizontal spacing in pixels
# bold_family = "Menlo"    # Optional: separate font for bold text
KeyTypeDefaultDescription
familyString"SF Mono"Font family name. Examples: "JetBrains Mono", "Menlo", "Fira Code", "Cascadia Code"
sizeFloat14.0Font size in points
line_heightFloat1.2Line height multiplier
letter_spacingFloat0.0Extra character spacing in pixels
bold_familyString?NoneOptional separate font family for bold text

[grid]

Grid layout for the pane tiling system. Only in config.toml (but rows/cols can be overridden by session files).

[grid]
rows = 3
cols = 3
gap = 4
inner_padding = 4
outer_padding = 4
title_bar_height = 24
border_radius = 8
KeyTypeDefaultDescription
rowsInteger1Number of rows in the pane grid
colsInteger1Number of columns in the pane grid
gapInteger4Gap between panes in pixels
inner_paddingInteger4Padding inside each pane (border to content)
outer_paddingInteger4Padding around the entire grid
title_bar_heightInteger24Height of each pane's title bar in pixels
border_radiusInteger8Corner radius for pane borders (0 = sharp)

[window]

Initial window dimensions and title. Only in config.toml (title can be overridden by session).

[window]
width = 1920
height = 1080
title = "trm"
KeyTypeDefaultDescription
widthInteger1920Initial window width in pixels
heightInteger1080Initial window height in pixels
titleString"trm"Window title (overridden by session-level title)

[colors]

Color scheme for all terminal panes. All values are hex strings (#RRGGBB or #RRGGBBAA). Only in config.toml.

[colors]
background = "#010409"
foreground = "#e6edf3"
cursor = "#f0f6fc"
selection = "#264f78"
border = "#30363d"
border_focused = "#58a6ff"
title_bg = "#0d1117"
title_fg = "#e6edf3"

ansi = [
    "#0d1117",  # 0  black
    "#ff7b72",  # 1  red
    "#3fb950",  # 2  green
    "#d29922",  # 3  yellow
    "#58a6ff",  # 4  blue
    "#bc8cff",  # 5  magenta
    "#39d353",  # 6  cyan
    "#c9d1d9",  # 7  white
    "#484f58",  # 8  bright black
    "#ffa198",  # 9  bright red
    "#56d364",  # 10 bright green
    "#e3b341",  # 11 bright yellow
    "#79c0ff",  # 12 bright blue
    "#d2a8ff",  # 13 bright magenta
    "#56d364",  # 14 bright cyan
    "#f0f6fc",  # 15 bright white
]
KeyDefaultDescription
background#010409Background color for all panes
foreground#e6edf3Default text/foreground color
cursor#f0f6fcCursor block color
selection#264f78Text selection highlight
border#30363dUnfocused pane border
border_focused#58a6ffFocused pane border (bright blue)
title_bg#0d1117Title bar background
title_fg#e6edf3Title bar text
ansi(16 colors)ANSI color palette: 8 normal + 8 bright

[text_tap]

The Text Tap API server. See the Text Tap API reference for protocol details. Only in config.toml.

[text_tap]
enabled = true
socket_path = "/tmp/trm.sock"
KeyTypeDefaultDescription
enabledBooleantrueEnable/disable the Unix socket server
socket_pathString"/tmp/trm.sock"Path for the Unix domain socket

[llm]

LLM integration for the AI command palette (Cmd+Shift+Enter). Supports Anthropic, OpenAI, Ollama, and custom OpenAI-compatible endpoints. Only in config.toml.

[llm]
provider = "anthropic"
# api_key = "sk-..."          # Or set ANTHROPIC_API_KEY env var
# model = "claude-sonnet-4-20250514"
# base_url = "https://..."    # For ollama/custom providers
max_tokens = 1024
# system_prompt = "You are a helpful terminal assistant."
KeyTypeDefaultDescription
providerString"anthropic"LLM provider: "anthropic", "openai", "ollama", "custom"
api_keyString?NoneAPI key (falls back to ANTHROPIC_API_KEY or OPENAI_API_KEY env vars)
modelString?NoneModel name. Defaults: Anthropic = claude-sonnet-4-20250514, OpenAI = gpt-4o, Ollama = llama3
base_urlString?NoneBase URL for Ollama/custom endpoints. Ollama default: http://localhost:11434/v1
max_tokensInteger1024Maximum tokens in the LLM response
system_promptString?NoneCustom system prompt override

[[panes]]

Pane definitions. Each [[panes]] block defines one pane in the grid. Panes fill the grid left-to-right, top-to-bottom.

Panes can appear in session files (trm.toml) or as a fallback in config.toml.

Common fields

KeyTypeDefaultDescription
typeString"terminal"Pane type (see Plugins)
titleString?Auto-generatedCustom title for the pane's title bar

Terminal pane fields

[[panes]]
type = "terminal"
title = "Dev Shell"
command = "/bin/zsh"
cwd = "~/projects/myapp"
watermark = "DEV"
initial_commands = ["echo 'Hello!'", "ls -la"]
# env = [["NODE_ENV", "development"], ["PORT", "3000"]]
KeyTypeDefaultDescription
commandString?$SHELLShell or command to run
cwdString?InheritedWorking directory (supports ~ expansion)
watermarkString?NoneLarge faded background text
initial_commandsString[]?NoneCommands to run on startup
env[String, String][]?NoneExtra environment variables

WebView pane fields

[[panes]]
type = "webview"
title = "Docs"
url = "https://docs.rs"
KeyTypeDefaultDescription
urlString?NoneURL to load in the embedded browser

Notes pane fields

[[panes]]
type = "notes"
title = "Scratch"
content = "Type here..."
# file = "~/notes.md"    # For persistent notes
KeyTypeDefaultDescription
contentString?NoneInitial in-memory content
fileString?NoneFile path for persistent storage (auto-saved)

Other plugin types

See the Plugins reference for full details on all 10 plugin types and their specific configuration fields.


Session-Level Overrides

Session files (trm.toml) support these top-level keys that override config.toml:

title = "My Project"     # Overrides [window] title
rows = 2                 # Overrides [grid] rows
cols = 3                 # Overrides [grid] cols

[[panes]]
# ... pane definitions

CLI Usage

trm                              # Default config/session
trm --config path/to/session.toml    # Specific session file
trm -h / --help                  # Print help
trm -v / --version               # Print version

Environment Variables

VariablePurpose
RUST_LOGLog level (e.g., RUST_LOG=debug trm)
SHELLDefault shell for terminal panes
ANTHROPIC_API_KEYAnthropic API key (fallback for [llm])
OPENAI_API_KEYOpenAI API key (fallback for [llm])