miudb Install
The Go binary is named miudb.
Release Install
brew install vanducng/tap/miudbAlternative:
go install github.com/vanducng/miu-db/cmd/miudb@v0.2.0Windows release archives are published on GitHub Releases as zip files. In PowerShell:
$version = "v0.2.0"$asset = "miudb_windows_x86_64.zip"Invoke-WebRequest "https://github.com/vanducng/miu-db/releases/download/$version/$asset" -OutFile $assetExpand-Archive $asset -DestinationPath ".\miudb" -Force.\miudb\miudb.exe version --output jsonUse miudb_windows_arm64.zip on Windows ARM64.
Make sure your Go bin directory is on PATH when using go install:
export PATH="$(go env GOPATH)/bin:$PATH"Verify:
miudb version --output jsonmiudb commands --output jsonNative Config
By default miudb reads and writes native files under:
~/.config/miu/db/connections.json~/.config/miu/db/credentials.jsonThe connection file stores metadata. Sensitive fields are classified before write and are stored through the selected secret backend.
Add a SQLite connection:
miudb connections add \ --name agent-deck \ --db-type sqlite \ --path /Users/vanducng/.agent-deck/profiles/default/state.db \ --output jsonAdd a PostgreSQL connection with Keychain/keyring-backed password storage:
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 jsonList and test:
miudb connections list --output jsonmiudb connections test app-dev --output jsonRun a bounded query:
miudb query run \ --connection app-dev \ --sql "select 1 as one" \ --limit 100 \ --output jsonRun a saved-connection health matrix:
miudb connections smoke \ --timeout 20s \ --concurrency 4 \ --output jsonStore Options
miudb --config-dir ~/.config/miu/db connections list --output jsonmiudb --connections-file ./connections.json connections list --output jsonmiudb --secret-source keyring,file,gopass connections test app-dev --output jsonNew connection secret stores:
keyring: OS Keychain/keyring service namedmiudbby default.file: local credential file with mode0600.inline: leave the value inconnections.json.none: discard the supplied value.
For migrated configs, miudb reads credentials-export.json from the same
directory when credentials.json is absent.
Local Checkout
go test ./...go build -buildvcs=false -o ./.miu-db/miudb ./cmd/miudb./.miu-db/miudb version --output json-buildvcs=false avoids VCS stamping failures in git worktree layouts.