Mid mresanto
winget install --id=mresanto.mid -e Terminal database client
winget install --id=mresanto.mid -e Terminal database client
mid is a terminal database client written in Rust for managing connections,
running queries, and quickly exploring results.
> mid is currently under active development.
Version 0.1.3 adds secure password storage and remote credential management.
$EDITOR-based connection setup.--is-secure.$EDITOR.All commands, options, examples, TUI controls, and detailed feature explanations are documented in FEATURES.md.
| Capability | PostgreSQL | MySQL | SQLite |
|---|---|---|---|
| Connect and run queries | Working | Working | Planned |
| Interactive table output | Working | Working | Planned |
| JSON output | Working | Working | Planned |
SQL INSERT export | Working | Working | Planned |
| List and select tables | Working | Working | Planned |
| Sort and filter results | Working | Working | Planned |
| Multi-cell selection | Working | Working | Planned |
| Update selected values | Experimental | Experimental | Planned |
$EDITOR for editor-based connection setup and query editing (optional for
other workflows).mid remote add 'postgres://user:pass%23word@localhost/app' --name app --is-secure
mid remote switch app
mid remote password app 'new#password'
Only the decoded password is saved in the OS secret manager. The config URL
contains {pass}, and mid restores the password when connecting. Encode
reserved password characters in connection URLs (# as %23); pass a raw
password to remote password. That command updates only secure remotes and
does not change the password on the database server.
Use mid remote edit to open config in $EDITOR, or mid remote retrieve app
to print the complete connection URL, including its password. Treat that output
as sensitive. Without --is-secure, passwords remain in the config file;
command-line credentials may also appear in shell history.
Build the project:
cargo build --release
Install mid into Cargo's binary directory:
cargo install --path .
If you're testing a local build, replace mid in the documentation examples with
cargo run --:
cargo run -- --help
Generate and install dynamic Fish completions in Fish's user completion directory:
mid generator --shell fish > ~/.config/fish/completions/mid.fish
Probably can work with other shells as well.
try
mid generator --shell {bash,zsh,fish} > ~/.config/{bash,zsh,fish}/completions/mid.{bash,zsh,fish}
after add the completions directory to your shell's config:
echo 'source ~/.config/{bash,zsh,fish}/completions/mid.{bash,zsh,fish}'
A dedicated mutate command is planned but is not implemented yet. The
intended workflow is to run mutations inside a transaction, report the affected
row count, and require explicit confirmation before committing:
# Planned syntax — not currently available
mid mutate 'DELETE FROM sessions WHERE expires_at < NOW()'
The goal is to provide guardrails for UPDATE, DELETE, TRUNCATE, and other
potentially destructive operations.
Other planned work includes:
For the full command reference, see FEATURES.md.
MID was originally created with the goal of taking existing TUIs and improving upon them by providing better performance, a faster experience, and a more efficient workspace.
The original idea and project were created by dossancto, who later passed the project on to me and is no longer actively involved in its development.