
narwhal (Nonanti/narwhal) is a Rust TUI database client that ships v1.0.0 today with connections to PostgreSQL, MySQL, SQLite, DuckDB, and ClickHouse in one interface. It offers vim modal editing, schema-aware completion, SSH tunnel support, headless exec mode, and a built-in MCP server — the standout feature — that exposes five JSON-RPC tools for AI agents with read-only defaults and workspace ACL scoping. The repo went public with 309 commits, indicating substantial prior private development. Five install paths available, including `cargo install narwhaldb`, Homebrew, and AUR.
psql aliased, a DataGrip license you keep meaning to cancel, and a sqlite3 REPL you still can't remember how to exit cleanly. Context switching is not the bottleneck people complain about — but it compounds.| Method | Command |
|---|---|
| cargo | cargo install narwhaldb |
| cargo-binstall | cargo binstall narwhaldb |
| Homebrew | brew tap Nonanti/tap && brew install narwhal |
| AUR (Arch) | yay -S narwhal |
| Nix flake | see README |
| Binary | download from GitHub Releases |
narwhal; the crates.io package name is narwhaldb — that mismatch will catch you once. Pre-compiled binaries cover Linux x86_64 and Apple Silicon (aarch64). If you're on an Intel Mac, cargo install narwhaldb is your path; the author notes in the README that the macOS-13 runner backlog on GitHub Actions is the reason the Intel binary isn't up yet 1.: command palette. If you live in Neovim, the muscle memory transfers. Schema-aware tab completion works on table names and column names mid-query — not just at the start of a SELECT.:begin, :commit, :rollback, and :savepoint are all supported, with a TX: active badge in the status bar so you don't accidentally leave an open transaction and lock yourself out 1. This is the kind of thing that sounds minor until you've spent 20 minutes wondering why a test won't pass because a previous interactive session left a row locked.narwhal exec -c <connection> 'SELECT ...' outputs in table, csv, json, or tsv format. You can drive it from a shell pipeline without opening the TUI at all.ssh_host and narwhal handles the port-forward, reusing your ~/.ssh/config 1. No separate tunnel setup before opening the client.~/.local/share/narwhal/history.jsonl, tagged by source. That's a clean audit trail if you're debugging what an AI agent actually ran against your database.
narwhal mcp starts a JSON-RPC stdio server that exposes five tools: list_connections, describe_schema, describe_table, run_query, and explain_query 1. Any MCP-compatible agent (Claude Code, Cursor, anything using the MCP protocol) can connect to it and query your databases directly..narwhal/workspace.toml that controls which connections the MCP server can see. So you can give an AI agent access to your dev database without worrying it'll discover your prod credentials are also in the config.describe_table and run_query directly. The schema context is accurate, not hand-typed. The agent's suggestions reflect what's actually in the database, not what you thought was in it..lua files in ~/.config/narwhal/plugins/ and they load on startup 1. The repo ships with ARCHITECTURE.md, CONTRIBUTING.md, and SECURITY.md — docs that usually show up after a project has run into the problems those documents address.cargo install narwhaldb works, but adds compile time 1.github.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.