Quick Start
Get connected in under 2 minutes.
Install
Section titled “Install”curl -fsSL https://clement-tourriere.github.io/dbcrust/install.sh | shirm https://clement-tourriere.github.io/dbcrust/install.ps1 | iexuv tool install dbcrust # install globallyuvx dbcrust <url> # or run without installinggit clone https://github.com/clement-tourriere/dbcrust.gitcd dbcrust && cargo install --path .Both dbcrust and dbc (short alias) are available after installation.
See Installation for all options including shell completion setup.
First connection
Section titled “First connection”dbcrust postgres://user:pass@localhost:5432/mydbTab-complete the URL scheme:
dbc pos[TAB] → postgres://dbc docker://[TAB] → lists running containersdbc session://[TAB] → lists saved sessionsdbcrust postgres://user:pass@localhost:5432/mydbdbcrust mysql://user:pass@localhost:3306/mydbdbcrust sqlite:///path/to/db.sqlitedbcrust clickhouse://user:pass@localhost:8123/defaultdbcrust mongodb://user:pass@localhost:27017/mydbdbcrust elasticsearch://localhost:9200dbcrust parquet:///data/sales.parquetdbcrust csv:///logs/*.csv?header=truedbcrust json:///events.jsondbcrust docker:// # interactive pickerdbcrust docker://my-postgres # directdbcrust session://production_dbdbcrust recent:// # pick from historyEssential commands
Section titled “Essential commands”Once connected you get an interactive REPL:
Navigate
Section titled “Navigate”\l -- list databases\dt -- list tables\d users -- describe table\c other_db -- switch databaseSQL with tab-completion on table and column names:
SELECT id, na[TAB] FROM us[TAB] WHERE st[TAB] = 'active';-- ↓ ↓ ↓-- name users statusDisplay
Section titled “Display”\x -- toggle expanded (vertical) display\e -- toggle EXPLAIN mode (shows query plans)\ev -- interactive EXPLAIN TUI\cs -- toggle column selection for wide resultsEXPLAIN visualization
Section titled “EXPLAIN visualization”\eSELECT u.name, COUNT(o.id) FROM users u LEFT JOIN orders o ON u.id = o.user_id GROUP BY u.name;○ Execution Time: 2.34 ms • Planning Time: 0.45 ms
Hash Join│ ○ Duration: 1.89 ms • Cost: 156 • Rows: 42│ Hash Cond: (u.id = o.user_id)├─ Seq Scan on users u│ │ ○ Duration: 0.23 ms • Rows: 42└─ Hash → Seq Scan on orders o │ ○ Duration: 0.34 ms • Rows: 234Save and reuse
Section titled “Save and reuse”-- Named queries with parameters\ns daily SELECT * FROM orders WHERE created_at >= current_date - interval '$1 days'daily 7
-- Sessions\ss production_db\s
-- Files\w query.sql\i setup.sql\ed -- open $EDITOR\h -- show all commands\q -- quitDesktop GUI
Section titled “Desktop GUI”mise install && mise run gui:devSee Desktop GUI for the full guide.
Shell completion
Section titled “Shell completion”dbcrust --completions bash > ~/.local/share/bash-completion/completions/dbcrustmkdir -p ~/.zfuncdbcrust --completions zsh > ~/.zfunc/_dbcrustdbc --completions zsh > ~/.zfunc/_dbc# Add to .zshrc (before oh-my-zsh if applicable):# fpath+=~/.zfunc# autoload -U compinit && compinitdbcrust --completions fish > ~/.config/fish/completions/dbcrust.fishWhat’s next
Section titled “What’s next”- Basic usage — full feature walkthrough
- Advanced features — named queries, sessions, column selection
- Desktop GUI — the Tauri desktop app
- File formats — Parquet, CSV, JSON
- Django integration — ORM analysis
- Python API — programmatic usage
- Command reference — all 50+ commands