The
tui command requires the tui feature to be enabled during installation.Usage
Interface overview
The TUI is divided into three main panels:1. Services panel (left)
- Lists all loaded services
- Shows service status (running/stopped)
- Displays port and base path information
- Navigate with
↑/↓arrow keys
2. Logs panel (center)
- Real-time request log streaming
- Shows method, path, status code, and timestamp
- Automatic scrolling for new entries
- Search and filter capabilities
3. Actions panel (right)
- Quick actions for selected service
- Performance metrics
- Keyboard shortcuts reference
- Service control buttons
Header
- Application title and version
- Current mode indicator
- System status
Keyboard shortcuts
Navigation
Switch between panels
Navigate within lists
Scroll through logs
Actions
Start selected service
Stop selected service
Restart selected service
Clear logs
Views
Toggle dashboard view
Open endpoint explorer
Open configuration view
Open marketplace dialog
Filtering
Open filter dialog for logs
Open search dialog
System
Show help dialog
Quit the TUI
Features
Real-time monitoring
The TUI updates service status and logs every second:- Service status: Automatically reflects starts, stops, and crashes
- Request logs: New requests appear instantly in the logs panel
- Metrics: Request counts and performance stats update live
Dashboard view
Pressd to toggle the dashboard view, which shows:
- Total requests over time
- Request rate sparklines
- Error rate trends
- Service health indicators
- Response time distributions
Endpoint explorer
Presse to explore and test endpoints:
- Select an endpoint from the list
- View request/response schemas
- Send test requests
- See results inline
Log filtering
Pressf to open the filter dialog:
- Filter by HTTP method (GET, POST, etc.)
- Filter by status code range
- Filter by path pattern
- Combine multiple filters
Search
Press/ to search through logs:
- Search request paths
- Search response bodies
- Navigate between matches with
n(next) andN(previous)
Marketplace
Pressm to browse and install service templates:
- Browse available templates
- Preview template contents
- Install directly into your services directory
Performance metrics
The actions panel displays performance information:- Average input latency: Response time for keyboard input
- Max input latency: Worst-case input lag
- Render time: UI refresh duration
- Loop time: Main event loop duration
The TUI is optimized to maintain sub-100ms input latency even with hundreds of log entries.
Configuration view
Pressc to view and edit configuration:
- Service definitions
- Port assignments
- Scenario settings
- Behavior rules
Graceful shutdown
When you quit the TUI:- Terminal is restored to normal mode
- Cursor visibility is restored
- Alternate screen buffer is released
- No artifacts left in your terminal
Troubleshooting
Terminal not supported
Raw mode error
Terminal too small
Cursor still hidden after exit
Solution: Runtput cnorm to manually restore cursor visibility.
Best practices
Monitor during development
Keep the TUI open while developing to see API requests in real-time
Use filters
Filter logs by status code to quickly find errors
Test with endpoint explorer
Verify endpoint behavior without leaving the terminal
Check metrics
Monitor performance metrics to ensure responsiveness
Comparison with other commands
| Feature | TUI | simulator start | simulator monitor |
|---|---|---|---|
| Real-time logs | ✅ | ❌ | ✅ |
| Interactive | ✅ | ❌ | ❌ |
| Service control | ✅ | ❌ | ❌ |
| Filtering | ✅ | ❌ | ❌ |
| Dashboard | ✅ | ❌ | ❌ |
| Background mode | ❌ | ✅ | ❌ |
Next steps
- Learn about service definitions in the Configuration guide
- Explore the Dashboard features
- Set up keyboard customization