Termy provides CLI commands to manage your configuration file efficiently.
Show Config
Display your current configuration settings.
Usage
What It Does
This command:
Locates your configuration file
Reads its contents (or shows defaults if it doesn’t exist)
Displays the configuration
Example Output
Existing Config
No Config File
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 = s econdary-t =n ew_tab
keybind = s econdary-w =c lose_tab
keybind = c ontrol-shift-c =c opy
keybind = c ontrol-shift-v =p aste
Use Cases
Quick Reference
Check your current settings without opening an editor:
Find Specific Setting
Check Theme
Check Font Size
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
What It Does
This command:
Locates (or creates) your configuration file
Opens it in your editor
Creates the config directory if needed
Editor Selection
The command uses the following priority:
$EDITOR environment variable
If set, uses your preferred editor: export EDITOR = vim
termy-cli -edit-config
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
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 = s econdary-t =n ew_tab
keybind = s econdary-w =c lose_tab
Use Cases
Quick Edit
Set Preferred Editor
Use VS Code
Use Neovim
Use Nano
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:
Reads your configuration file
Parses and validates syntax
Checks for invalid values
Detects tmux-related issues
Reports errors and warnings
Exit Codes
0 : Configuration is valid
1 : Configuration has errors
Example Output
Valid Config
Config with Warnings
Invalid Config
No Config File
Config file: /Users/username/.config/termy/config
Status: Valid
Config file: /Users/username/.config/termy/config
Warnings:
Line 12: keybind action 'resize_pane_left' requires tmux_enabled=true (restart required)
Line 13: keybind action 'resize_pane_right' requires tmux_enabled=true (restart required)
Result: Valid (with warnings)
Config file: /Users/username/.config/termy/config
Errors:
Line 3: font_size must be a positive number
Line 7: Invalid boolean value for cursor_blink
Warnings:
Line 2: Unknown root key: font_famly (typo?)
Result: Invalid
Config file: /Users/username/.config/termy/config
Status: File does not exist (using defaults)
Result: Valid
Validation Checks
Errors (Must Fix)
Malformed TOML syntax
Missing equals signs
Unclosed quotes
# ❌ Error
font = J etBrains 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 = m aybe
# ✅ 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 = s econdary-alt-left =r esize_pane_left
# ✅ Enable tmux to use pane commands
tmux_enabled = true
keybind = s econdary-alt-left =r esize_pane_left
Unrecognized [section] headers
# ⚠️ Warning
[ unknown_section ]
key = v alue
# ✅ 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:
Watch Config (Linux/macOS)
#!/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:
Reads your configuration file
Removes comments
Normalizes formatting
Writes the cleaned version back
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 = s econdary-t =n ew_tab # Open new tab
theme = "nord"
font = "JetBrains Mono"
font_size = 14
cursor_blink = true
keybind = s econdary-t =n ew_tab
When to Use
Cleaning up messy configs
After extensive editing, prettify for consistency: termy-cli -prettify-config
Preparing for version control
Normalize formatting before committing: termy-cli -prettify-config
git add ~/.config/termy/config
git commit -m "Update Termy 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:
Complete Workflow Example
View current configuration
Validate changes
termy-cli -validate-config
(Optional) Prettify
# Backup first!
cp ~/.config/termy/config ~/.config/termy/config.backup
termy-cli -prettify-config
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