-tui command launches an interactive terminal user interface (TUI) that provides visual access to all CLI features in a single, easy-to-navigate interface.
Usage
What It Does
The TUI provides a split-pane interface with:- Left panel: Menu of all available features
- Right panel: Content display for the selected feature
- Keyboard navigation: Quick access without typing commands
Interface Overview
Available Features
The TUI provides access to eight key features:1. Show Config
Displays your current configuration file contents.- Shows the config file path
- Displays all settings
- Indicates if using defaults (when file doesn’t exist)
2. List Fonts
Shows all available monospace fonts on your system.- Platform-specific font enumeration
- Sorted alphabetically
- Ready to copy into your config
3. List Themes
Browses all built-in color themes.- Complete list of theme identifiers
- Use these names in
theme = "name"config
4. List Colors
Displays the color palette for your active theme.- Theme name
- All ANSI colors with hex codes
- Foreground, background, and cursor colors
5. List Keybindings
Shows all active keyboard shortcuts.- Key combination and action pairs
- Availability status
- Tmux requirements
- Restart requirements
6. List Actions
Displays all available actions for keybinding.- Complete action names
- Availability metadata
- Use these in
keybind = key=actionconfig
7. Validate Config
Checks your configuration for errors.- Live validation feedback
- Error messages with line numbers
- Warning messages for potential issues
- “Valid” or “Invalid” result
8. Edit Config
Opens your configuration file in an editor.- Press Enter on this menu item
- TUI exits and launches your editor
- Uses
$EDITORor platform default
Keyboard Navigation
Menu Navigation
| Key | Action |
|---|---|
j or ↓ | Move down in menu |
k or ↑ | Move up in menu |
Enter | Select item (used for Edit Config) |
Content Scrolling
| Key | Action |
|---|---|
PgUp | Scroll content up (5 lines) |
PgDn | Scroll content down (5 lines) |
General
| Key | Action |
|---|---|
q | Quit TUI |
Esc | Quit TUI |
Use Cases
Exploring Configuration Options
Before editing your config, explore what’s available:Browse resources
Navigate to:
- List Fonts: See available fonts
- List Themes: Find a theme you like
- List Actions: Discover keybinding actions
Validating Changes
Check your configuration without leaving the TUI:Discovering Keybindings
Quickly look up keyboard shortcuts:- Launch TUI:
termy-cli -tui - Navigate to “List Keybindings”
- Use
PgUp/PgDnto scroll through all bindings - Find the action you’re looking for
Theme Selection Workflow
Visually compare themes:Benefits Over Individual Commands
Single Interface
Single Interface
Access all features without remembering individual command names:
Visual Feedback
Visual Feedback
- Structured layout for easier reading
- Scrollable content for long outputs
- Clear organization of information
Exploratory Workflow
Exploratory Workflow
- Browse resources without typing commands
- Quick navigation between features
- Learn what’s available interactively
Validation Preview
Validation Preview
- See validation results visually
- Errors and warnings clearly formatted
- Easy to read line numbers and messages
Technical Details
Implementation
The TUI is built using:- ratatui: Terminal UI framework
- crossterm: Cross-platform terminal manipulation
- Supports all major platforms (macOS, Linux, Windows)
Performance
The TUI:- Loads data on-demand when selecting menu items
- Responds to input in real-time
- Minimal resource usage
Compatibility
Works in:- Standard terminal emulators
- SSH sessions
- Tmux/screen sessions
- Windows Terminal, iTerm2, GNOME Terminal, etc.
The TUI requires a terminal with basic color and navigation support. It works in virtually all modern terminal emulators.
Exiting the TUI
There are two ways to exit:-
Normal exit: Press
qorEsc- Returns to your shell
- Exit code 0
-
Edit Config exit: Press
Enteron “Edit Config”- TUI exits
- Opens your config in editor
- Returns to shell when editor closes
TUI vs. Direct Commands
| Scenario | Recommended |
|---|---|
| Quick lookup (one thing) | Direct command (termy-cli -list-fonts) |
| Exploring multiple features | TUI (termy-cli -tui) |
| Scripting/automation | Direct commands |
| Learning Termy | TUI |
| Validation + browsing | TUI |
| CI/CD pipelines | Direct commands |
Example Workflow
Here’s a complete workflow using the TUI:Troubleshooting
TUI looks broken or garbled
TUI looks broken or garbled
Your terminal might not support the required features. Try:
Keyboard shortcuts don't work
Keyboard shortcuts don't work
Some terminal emulators intercept certain keys. If navigation doesn’t work:
- Use alternative keys (
j/kinstead of arrows) - Check your terminal’s keyboard settings
- Try a different terminal emulator
Content is cut off
Content is cut off
Resize your terminal window or use scrolling:
- Make terminal window larger
- Use
PgUp/PgDnto scroll content
Related Commands
CLI Overview
Learn about all CLI commands
Edit Config
Edit configuration directly
Validate Config
Validate from command line
Configuration Guide
Complete configuration reference