TOOLS
CLI / REPL
The Teide interactive shell provides syntax highlighting, tab completion, and multiple output formats for exploring data.
Launch Modes
Interactive REPL
# Start empty REPL
cargo run --release --features cli
# Or use the built binary
teide
CSV Quick-Load
# Load CSV as table 't' and enter REPL
teide data.csv
Execute SQL File
teide -f query.sql
teide -f query.sql --timer # Show execution times
Single Query
teide "SELECT 1 + 1"
Init Script
# Run setup.sql before entering REPL
teide -i setup.sql
teide data.csv -i setup.sql
Command-Line Arguments
| Argument | Description |
|---|---|
| (positional) | SQL query or CSV file path |
-f, --file PATH |
Execute SQL from file |
-i, --init PATH |
Run init script before REPL |
-t, --timer |
Show query execution times |
Dot Commands
| Command | Description |
|---|---|
.mode table|csv|json |
Set output format (default: table) |
.timer on|off |
Toggle execution time display |
.tables |
List all tables with row/column counts |
.mem |
Show memory usage statistics |
.help |
Display help |
.quit |
Exit the REPL |
Output Formats
Table (default)
Unicode-bordered table with headers, column types, and row counts. Right-aligned for numbers, left-aligned for strings. Shows first 20 + last 20 rows when result exceeds 40 rows.
CSV
.mode csv
Comma-separated values with headers.
JSON
.mode json
JSON array of objects.
REPL Features
- Tab completion for table names, column names, and SQL keywords
- SQL syntax highlighting
- History (stored in
~/.teide_history, 1000 entries) - Emacs keybindings
- Multi-line input (statements must end with
;)