
# narwhal
**The agent-native database workbench for the terminal.**
*A DBA toolkit, an MCP server, and a vim-mode SQL editor — in one static binary.*
[](https://github.com/Nonanti/narwhal/actions/workflows/ci.yml)
[](https://crates.io/crates/narwhaldb)
[](https://crates.io/crates/narwhaldb)
[](https://blog.rust-lang.org/)
[](#license)
[Install](#install) · [Quick start](#quick-start) · [Why narwhal](#why-narwhal) · [Docs](#documentation)
---

## What is narwhal?
narwhal is a terminal database client built around two things every
other client misses:
1. **DBA-grade tooling, not a toy REPL.** Schema diff with dialect-aware
DDL emit, append-only audit log, capability-gated plugin sandbox,
streaming cancellable queries, ER diagrams, SSH tunnels, secret
vault — the operational surface a real database day needs.
2. **First-class agent integration.** A built-in MCP server exposes
your connections, schema, and query execution to Claude, Cursor,
Zed, and any MCP-aware client. No proxy, no adapter — `narwhal mcp`
and you're wired.
Six engines (Postgres, MySQL, SQLite, DuckDB, ClickHouse, SQL Server),
three editor modes (vim / basic / emacs), one static binary.
## Install
```sh
curl -fsSL https://github.com/Nonanti/narwhal/releases/latest/download/install.sh | sh
```
Other channels — `cargo install narwhaldb`, Homebrew, AUR, Nix flake,
prebuilt tarballs — are listed in [`docs/install.md`](./docs/install.md).
## Quick start
```sh
narwhal # launches the TUI
```
Inside:
1. `:add` — connection wizard, or `:url postgres://user:pass@host/db`
2. `:open