Skip to content

TUI Mode

Magic Shell’s TUI (Terminal User Interface) mode provides a rich interactive experience for translating and executing commands.

Terminal window
mshell

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

All shortcuts use the Ctrl+X chord (press Ctrl+X, release, then press the key):

ShortcutAction
Ctrl+X POpen command palette
Ctrl+X ?Show help
Ctrl+X QExit TUI
Ctrl+CExit / Cancel current operation
EscClose dialogs
ShortcutAction
Ctrl+X MChange model
Ctrl+X SSwitch provider
Ctrl+X TChange theme
Ctrl+X DToggle dry-run mode
Ctrl+X CShow current config
ShortcutAction
Ctrl+X HShow command history
Ctrl+X LClear output

You can also type commands directly in the input:

CommandAction
!helpShow help
!modelChange model
!providerSwitch provider
!dryToggle dry-run mode
!configShow configuration
!historyShow command history
!clearClear output

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.

Magic Shell remembers your recent commands and translations:

  • Press Ctrl+X H to view history
  • History persists across sessions
  • Context from history improves future translations

Different models have different strengths:

  1. Press Ctrl+X M to open model picker
  2. Use arrow keys to navigate
  3. Press Enter to select
  4. Free models are indicated in the list

Switch between OpenCode Zen and OpenRouter:

  1. Press Ctrl+X S to open provider picker
  2. Select your provider
  3. You may need to enter an API key if switching to an unconfigured provider
  1. Use dry-run for complex queries first
  2. Check history for similar past commands
  3. Switch models if translations aren’t accurate
  4. Use the palette (Ctrl+X P) to discover features

The TUI is designed for keyboard efficiency:

  • No mouse required
  • All actions have shortcuts
  • Dialog navigation with arrow keys

Magic Shell uses context to improve translations:

  • Recent command history
  • Current working directory
  • Detected shell type
  • Ctrl+X Q - Graceful exit
  • Ctrl+C - Quick exit
  • Ctrl+D - Exit (on empty input)