db9s 0.1.1

k9s-style terminal UI to browse, query, and edit Postgres and MongoDB
db9s-0.1.1 is not a library.

db9s

Stars Downloads License: MIT GitHub release CI

Installation

cargo install db9s

Or grab a prebuilt binary (Linux, macOS, Windows) from the releases page.

Supported databases

Database Status
PostgreSQL 🟢 Supported
MongoDB 🟢 Supported
MySQL / MariaDB 🔴 Planned
SQLite 🔴 Planned
Redis 🔴 Planned
Microsoft SQL Server 🔴 Planned
ClickHouse 🔴 Planned
Cassandra / ScyllaDB 🔴 Planned

Every backend gets the same screens and keys. Want one sooner? See CONTRIBUTING.md.

Quick Start

db9s --postgres postgres://user:pass@localhost/db
db9s --mongo mongodb://localhost:27017

Or just run db9s and add connections from the TUI (a). They are saved to ~/.config/db9s/config.toml (Linux) / ~/Library/Application Support/db9s/config.toml (macOS):

[[connections]]
name = "local pg"
kind = "postgres"
url = "postgres://user:pass@localhost/db"

[[connections]]
name = "local mongo"
kind = "mongo"
url = "mongodb://localhost:27017"

editor = "nvim"  # optional, for `E` — defaults to $EDITOR, then vi

Usage

Key Action
j/k / arrows move (highlighting a table/collection previews its rows)
enter / tab open, switch between containers and rows pane
esc / q back a level (q quits from connections)
/ raw query: SQL for Postgres, JSON filter or [$match, ...] pipeline for Mongo
e edit the selected row/document inline, field by field (ctrl+s save)
E edit the selected row/document in $EDITOR, confirm the diff to save
d delete the selected row/document
n / p next / previous page
r refresh
a / e / d / s connections screen: add / edit / delete a connection, settings

The footer always shows the keys available where you are.

inline edit

Notes

  • Row edit/delete on Postgres needs a primary key column named id.
  • Color palette ported from mongotui.

Contributing

See CONTRIBUTING.md: local Postgres + Mongo with seed data, conformance tests for every backend, and how releases work.

License

MIT