Skip to content

Daily driver

miu-db uses a native Go store by default:

~/.config/miu/db/connections.json
~/.config/miu/db/credentials.json

New connections should be created through miudb connections add so sensitive fields are classified before write. The default secret store is the miudb OS Keychain/keyring service. Migrated configs can keep credentials-export.json in the same directory; miudb reads it when credentials.json is absent.

Terminal window
miudb connections list --output json
miudb connections smoke --timeout 20s --concurrency 4 --output json

SQLite:

Terminal window
miudb connections add \
--name local-app \
--db-type sqlite \
--path /path/to/app.db \
--output json

PostgreSQL/MySQL style TCP connection:

Terminal window
miudb connections add \
--name app-dev \
--db-type postgresql \
--host localhost \
--port 5432 \
--database app \
--username app \
--password "$APP_DB_PASSWORD" \
--secret-store keyring \
--output json

SSH tunnel-backed connection:

Terminal window
miudb connections add \
--name app-prod \
--db-type mysql \
--host prod-rds.internal \
--port 3306 \
--database app \
--username app \
--password "$APP_DB_PASSWORD" \
--tunnel \
--ssh-config-alias bastion \
--secret-store keyring \
--output json

Share a connections JSON file and import it on the target machine. Import merges by name, overwrites matching entries, and backs up the existing connections.json to connections.json.bak-<timestamp> before writing.

Terminal window
miudb connections import ./shared-connections.json --dry-run --output json
miudb connections import ./shared-connections.json --output json
Terminal window
miudb query run \
--connection app-dev \
--sql "select 1 as one" \
--limit 100 \
--output json