CLI
The TensorDB CLI provides an interactive SQL shell powered by clap and rustyline.
Installation
cargo build --release -p tensordb-cliUsage
# Open a database (creates if doesn't exist)tensordb-cli ./my_data
# With custom optionstensordb-cli --shard-count 8 ./my_dataInteractive Shell
$ tensordb-cli ./my_dataTensorDB v0.28 — Interactive SQL ShellType .help for commands, Ctrl+D to exit.
tensordb> CREATE TABLE users (id TEXT, name TEXT, email TEXT);OK
tensordb> INSERT INTO users VALUES ('u1', 'Alice', 'alice@example.com');1 row inserted (commit_ts: 1)
tensordb> SELECT * FROM users;id | name | email---+-------+------------------u1 | Alice | alice@example.com(1 row)
tensordb> EXPLAIN SELECT * FROM users WHERE id = 'u1';PointLookup { key: "table/users/u1", cost: 1.00 }Dot Commands
| Command | Description |
|---|---|
.help | Show available commands |
.tables | List all tables |
.schema <table> | Show table schema |
.quit | Exit the shell |
Features
- Tab completion: Table names and SQL keywords
- History: Arrow keys navigate command history
- Multi-line: Statements continue until
; - Formatted output: Aligned columns with borders