Skip to main content

Miumono database TUI for fast terminal SQL.

Project description

miu-db logo

miu-db

Miumono database console for the terminal.
Pick a connection, write SQL, inspect results, stay in your shell.

CI PyPI Python License

miu-db terminal database interface

miu-db is part of the miumono umbrella: small, focused terminal-native tools that are easy to install, easy to run locally, and predictable in CI.

Quick Start

Install from PyPI:

uv tool install miu-db
miu-db

Try the TUI without a real database:

miu-db --mock=sqlite-demo

Run one query from the CLI:

miu-db query -c local -q "select 1"

Source Install

For local development, install this checkout in editable mode. Code edits apply the next time you run miu-db.

cd /Users/vanducng/git/personal/miu-db
uv tool install --force --editable ".[all]"
miu-db --mock=sqlite-demo

Re-run the install command after changing dependencies, entry points, or pyproject.toml.

Connections

Save local connections:

miu-db connections add sqlite --name local --file-path ./app.db
miu-db connections add postgresql --name pg --server localhost --database app --username app
miu-db connections add mysql --name mysql --server localhost --database app --username app

Connect without saving:

miu-db connect sqlite --file-path ./app.db
miu-db postgresql://user:pass@localhost:5432/app
miu-db mysql://root@localhost/app

Manage saved connections:

miu-db connections list
miu-db connections delete local

Passwords are stored in the OS keyring under the miu-db service when possible.

Capabilities

  • Terminal UI with explorer, SQL editor, and results grid.
  • Vim-style normal/insert modes.
  • Per-connection query history.
  • Fuzzy filtering over result rows.
  • Saved connections with keyring-backed passwords.
  • Docker database discovery.
  • SSH tunnels.
  • Driver install hints when an adapter dependency is missing.

SQLite works out of the box. Optional adapters cover PostgreSQL, MySQL, SQL Server, MariaDB, Oracle, DuckDB, ClickHouse, Snowflake, BigQuery, Athena, Spanner, Turso, D1, Firebird, Redshift, Db2, HANA, Teradata, Trino, Presto, Flight SQL, Impala, SurrealDB, osquery, and more.

Keys

Key Action
i Insert mode
Esc Normal mode
e / q / r Focus explorer / query / results
Enter Run statement under cursor
h Query history
s Select top rows from table
v View selected cell
y / Y Copy cell / row
<space> Command menu
? Help
Ctrl+Q Quit

Config

This is a brand-new miu-db app, not a legacy config alias.

  • config: ~/.config/miu-db
  • override: MIU_DB_CONFIG_DIR
  • env vars: MIU_DB_*
  • keyring service: miu-db
miu-db config edit
miu-db config show-keymap

Develop

uv sync --all-extras --dev
uv run miu-db --mock=sqlite-demo
uv run pytest tests/unit/test_config_dir_resolution.py -q
uv run pytest tests/test_sqlite.py -q --timeout=60

Build the package:

uv run python -m build

Release tags use miumono component SemVer:

miu-db-v0.1.3

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miu_db-0.1.3.tar.gz (4.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miu_db-0.1.3-py3-none-any.whl (649.8 kB view details)

Uploaded Python 3

File details

Details for the file miu_db-0.1.3.tar.gz.

File metadata

  • Download URL: miu_db-0.1.3.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for miu_db-0.1.3.tar.gz
Algorithm Hash digest
SHA256 67002515209afb9118f0a7d585d6177d30b1eb505baa08bbc3c3d2b5b0f582af
MD5 d2efc145464591ffdd0f19c9af388d7e
BLAKE2b-256 83f7934362fb80501cbaeb13da7d38713dddd6b69362e641395c7ecf9e228b27

See more details on using hashes here.

Provenance

The following attestation bundles were made for miu_db-0.1.3.tar.gz:

Publisher: publish.yml on vanducng/miu-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miu_db-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: miu_db-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 649.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for miu_db-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 52be9265b91253ad57b6f6b2ad464dfc0184df61c6ea4757e299e813d64a3826
MD5 e90f56ff1673a634c96e67c261380598
BLAKE2b-256 de84cd85efb14b6621e4fd64d92773c73f737b0538a6bf51d4dd4ed4f56d8234

See more details on using hashes here.

Provenance

The following attestation bundles were made for miu_db-0.1.3-py3-none-any.whl:

Publisher: publish.yml on vanducng/miu-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page