Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

mycli

$ mycli Community High Risk
dbcli · Database & Data · BSD-3-Clause · macos / linux / windows

mycli 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.

FCRS-1.0 Score
73 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install mycli
CLI vs MCP Decision CLI Preferred vs MCP

Agents should prefer mysql --batch over mycli for headless SQL automation because mycli is optimized for interactive terminal ergonomics.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 14 / 25

Interactive prompt-toolkit REPL first; offers -e and --csv for scripting, but no --json and heavy TUI orientation.

  • Interactive REPL primary; supports -e and --csv
Trust & Safety 17 / 25

Reads .my.cnf, but lacks native --dry-run or built-in --read-only CLI flag.

  • No dedicated --read-only or --dry-run flag
Setup & Portability 12 / 15

Installable via Homebrew, PyPI, and uvx across major platforms.

  • Published on Homebrew and PyPI (dbcli/mycli)
Utility & Efficiency 13 / 15

Great interactive developer ergonomics for MySQL, though superfluous for non-interactive agents.

  • Human-focused SQL autocomplete and favorite queries
Maintenance & Lineage 9 / 10

Established dbcli/mycli project under BSD-3-Clause.

  • Active dbcli/mycli repository
Docs & Verifiability 8 / 10

Clear documentation at mycli.net/docs.

  • Official docs at mycli.net/docs

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Reads ~/.my.cnf and ~/.myclirc; supports MYSQL_PWD or --defaults-file.

Side Effects
Read-Only Remote Write Destructive
Cost & Quotas

100% free and BSD-3-Clause open-source.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Run a one-shot CSV query via 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 --csv and -e one-shot execution when needed.

Caveats & Pitfalls

  • ! Interactive-first design; mysql --batch is much lighter and safer for automated scripts.
  • ! Lacks a native --json flag.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI