Execution Modes
Internal Mode
Commands run inside dx TUI with full output capture and control
External Mode
Commands run in your shell, then return to dx interface
Internal Mode (Default)
- Full PTY integration for terminal apps
- Real-time ANSI color output
- Interactive stdin support
- Process control with confirmations
External Mode
- Runs in your native shell environment
- Full TTY access for complex applications
- Automatic return to dx interface
- Pause prompt for short-running commands
Real-Time Output Features
Visual Indicators
- Animated spinners during command execution
- Live timers showing execution duration
- Process status with colored exit codes
- Progress feedback for long-running tasks
ANSI Support
dx preserves full ANSI color sequences and terminal formatting:Interactive Input
Full stdin support for interactive commands like prompts, passwords, and user input
PTY integration automatically detects and handles TUI applications
Proper forwarding of Ctrl+C, Ctrl+Z, and other terminal signals
Process Control & Safety
Safe Kill Confirmation
When you pressCtrl+C
during command execution:
- dx shows a confirmation modal
- Press
Enter
to kill the process - Press
Esc
to cancel and continue
Exit Status Handling
Commands complete with clear status indicators:- 🟢 Success - Exit code 0 with green indicator
- 🔴 Error - Non-zero exit with red indicator
- 🟡 Terminated - Process killed with yellow indicator
Advanced Features
Environment Variables
Commands inherit your shell environment plus dx-specific variables:Working Directory
Commands execute in the directory where dx was launched, with full access to:- Project files and directories
- Git repository context
- Local configurations
Output Capture
All command output is captured and can be:- Scrolled through with full history
- Searched and filtered
- Exported or shared via recordings
Use
external = true
for commands that need full shell features like job control, complex piping, or shell-specific syntax.Interactive password prompts work best with
external = false
mode for security and proper terminal handling.