Interactive Shell Quick Start
Get started with the SQLStream interactive TUI in 5 minutes!
Step 1: Install SQLStream with Interactive Support
# Using uv (recommended)
uv tool install "sqlstream[all]"
# Or using pip
pip install "sqlstream[interactive,all]"
Step 2: Launch the Shell
With a File
Without a File
Then use the file browser (Ctrl+O) to open files.
Step 3: Your First Query
Once the shell opens, you'll see:
- Top: Query editor with syntax highlighting
- Bottom: Results table
- Sidebar: Schema browser or file explorer
Type your first query:
Press F5 or Ctrl+Enter to execute.
Essential Keyboard Shortcuts
Query Execution
F5orCtrl+Enter: Execute queryCtrl+C: Cancel running query
Navigation
Ctrl+T: New tabCtrl+W: Close tabCtrl+Tab/Ctrl+Shift+Tab: Switch between tabsCtrl+Up/Down: Navigate query history
Editing
Ctrl+Delete: Delete word forwardCtrl+Backspace: Delete word backwardCtrl+A: Select all
Panels
F2: Toggle left sidebar (Schema/Files)F3: Toggle right sidebar (Filters/Export/Config)Ctrl+O: Open file browserCtrl+L: Cycle layout sizes (50%/60%/70%/80%/100%)
Backend
F5orCtrl+B: Cycle backends (Auto → DuckDB → Pandas → Python)
Results
Ctrl+F: Filter resultsCtrl+X: Export results (CSV/JSON/Parquet)- Click column headers: Sort by column
Other
F4: Show query execution planCtrl+S: Save current stateCtrl+QorCtrl+D: Quit (auto-saves)
Step 4: Working with Multiple Tabs
The interactive shell supports multiple tabs for different queries:
- Press
Ctrl+Tto create a new tab - Switch tabs with
Ctrl+Tab - Each tab has its own:
- Query editor
- Query history
- Results
- Schema context
Example workflow:
- Tab 1: Exploratory queries (SELECT * FROM employees)
- Tab 2: Aggregations (SELECT department, COUNT(*) FROM employees GROUP BY department)
- Tab 3: Complex JOINs across multiple files
Step 5: File Browser
Press Ctrl+O to open the file browser:
- Navigate with arrow keys
- Press Enter to load a file
- Shows file tree with directories
- Supports CSV, Parquet, JSON, HTML, Markdown, XML
Step 6: Schema Browser
Toggle with F2 to see:
- All tables/files loaded
- Column names and types
- Row counts
- File paths
This helps you write queries without remembering column names!
Step 7: Backend Toggle
Press F5 or Ctrl+B to cycle through backends:
- Auto (default): Automatically chooses best backend
- DuckDB: For complex SQL (CTEs, window functions)
- Pandas: For large files, basic queries (10-100x faster)
- Python: Pure Python implementation (learning/debugging)
The current backend is shown in the status bar.
Step 8: Query Plan Visualization
Press F4 to see how your query will be executed:
- Shows optimization steps
- Column pruning details
- Predicate pushdown
- Join strategies
Useful for: - Understanding performance - Debugging slow queries - Learning query optimization
Step 9: Filtering Results
After executing a query:
- Press
Ctrl+Fto open filter sidebar - Choose filter type:
- Column-specific: Filter by specific column value
- Global search: Search across all columns
- Results update live
Step 10: Exporting Results
Press Ctrl+X to export:
- Choose format (CSV, JSON, Parquet)
- Enter filename
- Results are saved to disk
Common Workflows
Data Exploration
- Launch shell:
sqlstream shell data.csv - Check schema (F2)
- Run exploratory queries:
- Create new tabs for different analyses
Multi-File Analysis
- Launch shell:
sqlstream shell - Open file browser (
Ctrl+O) - Load multiple files
- JOIN them in queries:
Report Generation
- Write complex query
- Toggle to DuckDB backend (
F5) for advanced SQL - Filter results (
Ctrl+F) - Export to CSV/JSON (
Ctrl+X) - Save query in tab for future use (auto-saved on exit)
State Persistence
The shell automatically saves:
- All open tabs and their queries
- Query history per tab
- Layout preferences
- Backend selection
- File browser state
When you reopen the shell, everything is restored!
Tips & Tricks
Quick Column Reference
Instead of memorizing column names:
- Toggle schema browser (
F2) - Write query while viewing columns
- Toggle back to full-screen editor (
F2)
Query History
- Use
Ctrl+Up/Downto cycle through previous queries - Works across sessions (history is persisted)
- Each tab has its own history
Layout Optimization
- Use
Ctrl+Lto cycle between layout sizes - Large query? Use 70-80% editor space
- Large results? Use 50% split
Performance Monitoring
- Enable
--timemode to see execution times - Use
F4to see query plan - Toggle to pandas/duckdb backend for better performance
What's Next?
- Interface Guide - Complete UI reference
- Keyboard Shortcuts - All shortcuts
- Workflows - Advanced workflows and tips
Need Help?
Press F1 in the shell for help, or: