System Architecture¶
Component Flow¶
Shell / agents Neovim SQL buffers Future UI
| | |
+---------- CLI / protocol boundary ---------+
|
miudb
|
config, secrets, tunnels, adapters, workers
|
database drivers
Core Responsibilities¶
The Go core owns saved connections, sensitive-field classification, secret resolution, SSH tunnel setup, adapter selection, query execution, schema inspection, result pagination, and machine-readable output.
Frontends are thin clients. The Neovim plugin shells out to miudb, renders
connection and result scratch buffers, and keeps SQL editing in normal files.
Native Store¶
The default store is ~/.config/miu/db:
For migrated configs, credentials-export.json is read from the same directory
when credentials.json is absent. New credentials default to the miudb OS
Keychain/keyring service.
Runtime Paths¶
internal/config/store.goresolves the default config directory and connection file.internal/config/secrets.goresolves keyring, file, gopass, command, and env secret providers.internal/tunnel/tunnel.goestablishes SSH tunnel-backed TCP connections.internal/cli/commands.goexposes connection, query, schema, and protocol commands.ui/miu-db.nvimprovides the current Neovim client.