Interactive TUI
PraisonAI CLI provides a rich interactive terminal user interface (TUI) for seamless AI-assisted coding sessions. Built with prompt_toolkit and Rich, it offers command completion, history, and beautiful output formatting.Overview
The Interactive TUI provides:- Command completion - Auto-complete for slash commands and files
- History - Persistent command history with search
- Syntax highlighting - Colorized input and output
- Status display - Real-time session information
- Keyboard shortcuts - Efficient navigation
Quick Start
Features
Command Completion
Type/ and press Tab to see available commands:
History
Navigate through previous commands:- Up Arrow - Previous command
- Down Arrow - Next command
- Ctrl+R - Search history
Multi-line Input
Enter multi-line prompts:Syntax Highlighting
Input is highlighted as you type:Python API
Basic Usage
Configuration
Custom Completions
History Management
Status Display
Keyboard Shortcuts
Navigation
| Shortcut | Action |
|---|---|
↑ / ↓ | Navigate history |
Ctrl+R | Search history |
Ctrl+A | Move to start of line |
Ctrl+E | Move to end of line |
Ctrl+W | Delete word backward |
Editing
| Shortcut | Action |
|---|---|
Tab | Auto-complete |
Ctrl+C | Cancel current input |
Ctrl+D | Exit (on empty line) |
Ctrl+L | Clear screen |
Multi-line
| Shortcut | Action |
|---|---|
Enter | New line (in multi-line mode) |
Enter on empty | Submit input |
Ctrl+Enter | Submit immediately |
VI Mode
Enable VI keybindings:Esc- Enter command modei- Insert modea- Append modedd- Delete line/- Search
Customization
Custom Prompt
Dynamic Prompt
Custom Theme
Integration
With Slash Commands
With Cost Tracking
Fallback Mode
If prompt_toolkit is not available, a simple fallback is used:Best Practices
- Use completions - Press Tab often for faster input
- Learn shortcuts - Ctrl+R for history search is powerful
- Multi-line for code - Use multi-line mode for code snippets
- Check status - Monitor costs and tokens in status bar
Troubleshooting
Completions Not Working
History Not Persisting
Display Issues
Related Features
- Slash Commands - Interactive commands
- Cost Tracking - Monitor spending
- Session - Session management

