miu-db
Fast terminal SQL across your databases.
Pick a connection, write SQL, inspect results, stay in your shell.
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
On first run, miu-db copies missing files from ~/.config/sqlit into
~/.config/miu/db so existing saved connections keep working. Existing files
in the new location are never overwritten.
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.5
License
MIT
Metadata
Release files for miu-db 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| miu_db-0.1.5.tar.gz | 3.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| miu_db-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.0 MB
Release files / miu_db-0.1.5.tar.gz
| Download URL | miu_db-0.1.5.tar.gz |
|---|---|
| Size | 3.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a1aa295b14f5ce72dc6a5bced39f1daf2d0e4859df75d455b5b1bf3397efefd
|
|
BLAKE2b-256 checksum How to use checksums |
037e99e9d9891bad158d407e96dfd7a7b5b68417aa41b0fa38cd637afa507c6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 27, 2026.
Transparency logRelease files / miu_db-0.1.5-py3-none-any.whl
| Download URL | miu_db-0.1.5-py3-none-any.whl |
|---|---|
| Size | 650.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7ff22b2894679df0208eadbd9ecc06c1615d4f2639ac75518a720351180da51
|
|
BLAKE2b-256 checksum How to use checksums |
14016dce53f9332454bc6d76bc66e97412d5ac7885aa8d0c73d1e9c08bd2e68a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 27, 2026.
Transparency log