tablecli: a terminal UI for databases in one 15 MB binary (Rust)
tablecli is a database browser for the terminal: catalog on the left, SQL editor, results below. It is one binary with nothing to install first, so it runs the same on a laptop, over SSH or in a small container.
- SQLite, PostgreSQL, MySQL/MariaDB, and DuckDB with CSV, Parquet and JSON files and S3 buckets
- Autocomplete, vim or modeless keys, history, saved queries
- Results stream in; sort, filter, follow foreign keys, edit cells, export
- ER diagrams in the terminal
Why: Harlequin showed how good a SQL IDE in the terminal can be. I wanted the same without Python on the machine.
Numbers
(SQLite, 1M row table, median of 11 runs, MacBook M3 Pro, released binaries):
| Category | tablecli 0.1.0 | Harlequin 2.18.0 | lazysql 0.7.0 |
|---|---|---|---|
| Install size | 15 MiB | 228 MiB | 29 MiB |
| Start | 24 ms | 431 ms | 65 ms |
| Idle memory | 10 MiB | 124 MiB | 24 MiB |
| First 10k rows of a query | 6 ms | 134 ms | 36 ms |
Method and scripts: https://github.com/tablecli/tablecli/blob/main/docs/comparison.md
Status
- macOS and Linux: work, I use it daily on my laptop and through SSH on my servers
- Windows: builds and passes CI, not used on real hardware yet
MIT licensed
Repo and downloads: https://github.com/tablecli/tablecli
Feedback and bug reports welcome! :)
