TUI Mode
Magic Shell’s TUI (Terminal User Interface) mode provides a rich interactive experience for translating and executing commands.
Launching TUI Mode
Section titled “Launching TUI Mode”mshellInterface Overview
Section titled “Interface Overview”The TUI displays:
- Header: Current model, provider, and mode indicators
- Output area: Command translations and results
- Input area: Where you type your queries
- Status bar: Helpful hints and keyboard shortcuts
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”All shortcuts use the Ctrl+X chord (press Ctrl+X, release, then press the key):
Navigation & Control
Section titled “Navigation & Control”| Shortcut | Action |
|---|---|
Ctrl+X P | Open command palette |
Ctrl+X ? | Show help |
Ctrl+X Q | Exit TUI |
Ctrl+C | Exit / Cancel current operation |
Esc | Close dialogs |
Configuration
Section titled “Configuration”| Shortcut | Action |
|---|---|
Ctrl+X M | Change model |
Ctrl+X S | Switch provider |
Ctrl+X T | Change theme |
Ctrl+X D | Toggle dry-run mode |
Ctrl+X C | Show current config |
History & Output
Section titled “History & Output”| Shortcut | Action |
|---|---|
Ctrl+X H | Show command history |
Ctrl+X L | Clear output |
Direct Commands
Section titled “Direct Commands”You can also type commands directly in the input:
| Command | Action |
|---|---|
!help | Show help |
!model | Change model |
!provider | Switch provider |
!dry | Toggle dry-run mode |
!config | Show configuration |
!history | Show command history |
!clear | Clear output |
Dry-Run Mode
Section titled “Dry-Run Mode”When dry-run mode is enabled:
- Commands are translated but not executed
- Full safety analysis is shown
- Great for learning and reviewing
Toggle with Ctrl+X D or !dry.
Command History
Section titled “Command History”Magic Shell remembers your recent commands and translations:
- Press
Ctrl+X Hto view history - History persists across sessions
- Context from history improves future translations
Model Switching
Section titled “Model Switching”Different models have different strengths:
- Press
Ctrl+X Mto open model picker - Use arrow keys to navigate
- Press Enter to select
- Free models are indicated in the list
Provider Switching
Section titled “Provider Switching”Switch between OpenCode Zen and OpenRouter:
- Press
Ctrl+X Sto open provider picker - Select your provider
- You may need to enter an API key if switching to an unconfigured provider
Tips for TUI Mode
Section titled “Tips for TUI Mode”Efficient Workflow
Section titled “Efficient Workflow”- Use dry-run for complex queries first
- Check history for similar past commands
- Switch models if translations aren’t accurate
- Use the palette (
Ctrl+X P) to discover features
Keyboard-First
Section titled “Keyboard-First”The TUI is designed for keyboard efficiency:
- No mouse required
- All actions have shortcuts
- Dialog navigation with arrow keys
Context Awareness
Section titled “Context Awareness”Magic Shell uses context to improve translations:
- Recent command history
- Current working directory
- Detected shell type
Exiting TUI
Section titled “Exiting TUI”Ctrl+X Q- Graceful exitCtrl+C- Quick exitCtrl+D- Exit (on empty input)