Skip to main content
Termy provides CLI commands to manage your configuration file efficiently.

Show Config

Display your current configuration settings.

Usage

termy-cli -show-config

What It Does

This command:
  1. Locates your configuration file
  2. Reads its contents (or shows defaults if it doesn’t exist)
  3. Displays the configuration

Example Output

Config file: /Users/username/.config/termy/config

theme = "nord"
font = "JetBrains Mono"
font_size = 14
cursor_blink = true
background_blur = 10
tmux_enabled = false

keybind = secondary-t=new_tab
keybind = secondary-w=close_tab
keybind = control-shift-c=copy
keybind = control-shift-v=paste

Use Cases

Quick Reference

Check your current settings without opening an editor:
termy-cli -show-config

Find Specific Setting

termy-cli -show-config | grep "theme"

Export Configuration

Save your config for backup or sharing:
termy-cli -show-config > my-termy-config.txt

Edit Config

Open your configuration file in your preferred editor.

Usage

termy-cli -edit-config

What It Does

This command:
  1. Locates (or creates) your configuration file
  2. Opens it in your editor
  3. Creates the config directory if needed

Editor Selection

The command uses the following priority:
1

$EDITOR environment variable

If set, uses your preferred editor:
export EDITOR=vim
termy-cli -edit-config
2

Platform-specific fallback

If $EDITOR is not set or fails:
  • macOS: open -t (TextEdit)
  • Linux: xdg-open, then tries nano, vim, vi
  • Windows: notepad

Example Session

termy-cli -edit-config
Your editor opens with the configuration file:
# Termy Configuration

theme = "nord"
font = "JetBrains Mono"
font_size = 14
cursor_blink = true
background_blur = 10
tmux_enabled = false

keybind = secondary-t=new_tab
keybind = secondary-w=close_tab

Use Cases

Quick Edit

termy-cli -edit-config

Set Preferred Editor

export EDITOR="code --wait"
termy-cli -edit-config
Add export EDITOR=your-editor to your shell profile (~/.bashrc, ~/.zshrc) to make it permanent.

Edit-Validate Workflow

# Edit configuration
termy-cli -edit-config

# Validate changes
termy-cli -validate-config

# If valid, restart Termy to apply

Validate Config

Check your configuration file for errors and warnings.

Usage

termy-cli -validate-config

What It Does

This command:
  1. Reads your configuration file
  2. Parses and validates syntax
  3. Checks for invalid values
  4. Detects tmux-related issues
  5. Reports errors and warnings

Exit Codes

  • 0: Configuration is valid
  • 1: Configuration has errors

Example Output

Config file: /Users/username/.config/termy/config
Status: Valid

Validation Checks

Errors (Must Fix)

  • Malformed TOML syntax
  • Missing equals signs
  • Unclosed quotes
# ❌ Error
font = JetBrains Mono  # Missing quotes

# ✅ Correct
font = "JetBrains Mono"
  • Font size not a positive number
  • Invalid color hex codes
  • Unrecognized boolean values
# ❌ Error
font_size = 0
font_size = -5
cursor_blink = maybe

# ✅ Correct
font_size = 14
cursor_blink = true

Warnings (Should Review)

  • Typos in configuration keys
  • Deprecated options
# ⚠️ Warning
font_famly = "Monaco"  # Typo: should be font_family

# ✅ Correct
font = "Monaco"
  • Tmux-only actions when tmux_enabled = false
# ⚠️ Warning when tmux_enabled = false
keybind = secondary-alt-left=resize_pane_left

# ✅ Enable tmux to use pane commands
tmux_enabled = true
keybind = secondary-alt-left=resize_pane_left
  • Unrecognized [section] headers
# ⚠️ Warning
[unknown_section]
key = value

# ✅ Use recognized sections
[colors]
foreground = "#ffffff"

Use Cases

Pre-Restart Validation

Always validate before restarting Termy:
termy-cli -edit-config
# ... make changes ...
termy-cli -validate-config

CI/CD Integration

Use in scripts with exit code checking:
#!/bin/bash
termy-cli -validate-config
if [ $? -eq 0 ]; then
  echo "✅ Configuration is valid"
  # Deploy or apply config
else
  echo "❌ Configuration has errors"
  exit 1
fi

Continuous Validation

Watch for changes and auto-validate:
#!/bin/bash
while true; do
  inotifywait -e modify ~/.config/termy/config
  termy-cli -validate-config
done

Prettify Config

Reformat and clean up your configuration file.

Usage

termy-cli -prettify-config

What It Does

This command:
  1. Reads your configuration file
  2. Removes comments
  3. Normalizes formatting
  4. Writes the cleaned version back
  5. Displays the result
Destructive Operation: This command removes all comments from your config file. Make a backup if you want to preserve comments.

Example

# My custom theme
theme = "nord"  # I love this theme

# Font settings
font = "JetBrains Mono"
font_size = 14  # Perfect size for my screen

cursor_blink = true

# Keybindings
keybind = secondary-t=new_tab  # Open new tab

When to Use

After extensive editing, prettify for consistency:
termy-cli -prettify-config
Normalize formatting before committing:
termy-cli -prettify-config
git add ~/.config/termy/config
git commit -m "Update Termy config"
Clean up after experimentation:
# Backup first!
cp ~/.config/termy/config ~/.config/termy/config.backup
termy-cli -prettify-config

Backup Before Prettify

# Create backup
cp ~/.config/termy/config ~/.config/termy/config.backup

# Prettify
termy-cli -prettify-config

# If you need to restore
# cp ~/.config/termy/config.backup ~/.config/termy/config

Configuration File Location

All commands operate on your Termy configuration file:
~/.config/termy/config

Complete Workflow Example

1

View current configuration

termy-cli -show-config
2

Edit configuration

termy-cli -edit-config
Make your changes…
3

Validate changes

termy-cli -validate-config
4

(Optional) Prettify

# Backup first!
cp ~/.config/termy/config ~/.config/termy/config.backup
termy-cli -prettify-config
5

Restart Termy

Restart Termy to apply your changes.

List Fonts

Discover available fonts

List Themes

Browse color themes

List Keybinds

View keyboard shortcuts

Configuration Guide

Full configuration reference

Build docs developers (and LLMs) love