DBCrab is a modern REPL-first PostgreSQL client.
Documentation | crates.io | Releases
REPL view:
Full-screen TUI view:
- Multiline SQL editing with highlighting, persistent history, and schema-aware, context-aware completion.
- A separate command editor for catalog discovery, object inspection, reusable named SQL, and CSV transfer.
- Automatic inline or full-screen result display, including cell preview and guarded updates for eligible table-backed results.
- Emacs and Vi editing with configurable editor, prompt, command, and TUI keys.
- Context-isolated history and named SQL for different projects or databases.
- Agentic mode for safe, bounded SQL and command execution by LLM agents.
cargo install --locked dbcrabcurl -fsSL https://gitlab.com/akhansari/dbcrab/-/raw/main/install.sh | shPrebuilt macOS releases are not available yet. If you can help build and test them, contributions are welcome: open an issue or submit a merge request on GitLab.
Pass a PostgreSQL connection string:
dbcrab postgres://user@localhost/databaseType SQL at the > prompt and end each statement with a semicolon.
Press : on an empty prompt to enter DBCrab command mode.
Read the Quickstart or browse the full documentation.

