Launch interactive mode
Start the TUI:Features
The interactive mode provides a visual interface for:- Browsing basins and streams
- Viewing stream configurations
- Monitoring stream activity
- Quick access to common operations
Setup screen
If you launch the TUI without configuring an access token, you’ll see a setup screen prompting you to configure authentication. To configure before launching:Navigation
The TUI uses standard terminal navigation:Keyboard shortcuts
- Arrow keys or h/j/k/l - Navigate lists and menus
- Enter - Select item or confirm action
- Esc or q - Go back or quit
- / - Search or filter
- Tab - Switch between panels
- Ctrl+C - Exit immediately
Mouse support
If your terminal supports mouse input:- Click - Select items
- Scroll - Navigate lists
Terminal requirements
Supported terminals
The TUI works best with modern terminal emulators:- Linux/macOS: iTerm2, Terminal.app, Alacritty, Kitty, GNOME Terminal
- Windows: Windows Terminal, ConEmu, Cmder
Minimum terminal size
Recommended: 80 columns x 24 rows or largerColor support
The TUI uses colors for better readability. Ensure your terminal supports:- 256-color mode (recommended)
- True color (24-bit) for best experience
Architecture
The TUI is built using:- ratatui - Terminal UI framework
- crossterm - Cross-platform terminal control
- tokio - Async runtime for non-blocking operations
Limitations
Read-only mode
The current TUI implementation is primarily for browsing and viewing. For write operations, use the standard CLI commands.Performance
When browsing accounts with thousands of basins or streams, initial loading may take a moment. The TUI implements pagination to handle large datasets.Troubleshooting
Terminal not restored after crash
If the TUI exits unexpectedly and your terminal looks broken:Display issues
If you see garbled characters or layout problems:-
Verify your terminal supports UTF-8:
- Try resizing your terminal window
- Ensure terminal is at least 80x24 characters
Mouse not working
Mouse support depends on your terminal emulator. Not all terminals support mouse input in TUI applications.Access token errors
If you see authentication errors:- Exit the TUI (press
qor Ctrl+C) - Configure your access token:
- Relaunch:
s2 -i
Using TUI over SSH
The TUI works over SSH connections. Ensure:- Your SSH client supports terminal emulation
- The
TERMenvironment variable is set correctly:
SSH configuration
For best results, enable terminal forwarding in your SSH config:Comparison with CLI commands
| Task | TUI | CLI |
|---|---|---|
| Browse basins | Visual interface | s2 list-basins |
| View streams | Navigate with arrows | s2 list-streams |
| View config | Select and view | s2 get-stream-config |
| Create basin | Not supported | s2 create-basin |
| Append records | Not supported | s2 append |
| Read records | Not supported | s2 read |
When to use interactive mode
Use the TUI when:- Exploring basins and streams interactively
- Viewing configurations and metadata
- Learning the S2 structure of an account
- Quick browsing without typing long commands
- Scripting and automation
- CI/CD pipelines
- Writing or reading records
- Creating or modifying resources
- Batch operations
Examples
Quick exploration
Find stream configuration
TUI for discovery, CLI for operations
Future enhancements
Planned features for the interactive mode include:- Creating basins and streams from TUI
- Real-time stream tail viewer
- Metrics and monitoring dashboards
- Stream search and filtering
- Configuration editing