# DBCrab
DBCrab is a modern REPL-first PostgreSQL client.
REPL view:

Full-screen TUI view:

## Features
- 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.
## Install
### Cargo
```sh
cargo install --locked dbcrab
```
### Prebuilt release
```sh
Prebuilt macOS releases are not available yet.
If you can help build and test them,
contributions are welcome: [open an issue](https://gitlab.com/akhansari/dbcrab/-/issues)
or submit a merge request on GitLab.
## Start
Pass a PostgreSQL connection string:
```sh
dbcrab postgres://user@localhost/database
```
Type SQL at the `>` prompt and end each statement with a semicolon.\
Press `:` on an empty prompt to enter DBCrab command mode.
Read the [Quickstart](https://akhansari.gitlab.io/dbcrab/quickstart/)
or browse the [full documentation](https://akhansari.gitlab.io/dbcrab/).