mycli
$ mycli Community High Riskmycli brings auto-completion and rich terminal formatting to MySQL, MariaDB, and Percona servers. While it supports -e one-shot queries and --csv output, it is built for interactive human terminal sessions rather than unattended agent workflows.
brew install mycli Agents should prefer mysql --batch over mycli for headless SQL automation because mycli is optimized for interactive terminal ergonomics.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Interactive prompt-toolkit REPL first; offers -e and --csv for scripting, but no --json and heavy TUI orientation.
- Interactive REPL primary; supports
-eand--csv
Reads .my.cnf, but lacks native --dry-run or built-in --read-only CLI flag.
- No dedicated
--read-onlyor--dry-runflag
Installable via Homebrew, PyPI, and uvx across major platforms.
- Published on Homebrew and PyPI (
dbcli/mycli)
Great interactive developer ergonomics for MySQL, though superfluous for non-interactive agents.
- Human-focused SQL autocomplete and favorite queries
Established dbcli/mycli project under BSD-3-Clause.
- Active
dbcli/myclirepository
Clear documentation at mycli.net/docs.
- Official docs at mycli.net/docs
Security, Auth & Guardrails
Reads ~/.my.cnf and ~/.myclirc; supports MYSQL_PWD or --defaults-file.
100% free and BSD-3-Clause open-source.
# mycli Agent Rules - Prefer standard `mysql --batch` over `mycli` in automated agent loops. - Never invoke `mycli` without `-e "<sql>"` (interactive REPL will stall). - Ensure `PAGER=cat` is set when capturing output.
Agent-Ready Command Recipes
Safe Read-Only Queries
mycli mycli --defaults-file=.my.cnf --csv -e "SELECT version();"
Executes a single non-interactive query and renders CSV output.
Strengths for Agents
- + Top-notch autocomplete and syntax highlighting for human MySQL debugging.
- + Supports
--csvand-eone-shot execution when needed.
Caveats & Pitfalls
- ! Interactive-first design;
mysql --batchis much lighter and safer for automated scripts. - ! Lacks a native
--jsonflag.