mycli
Mycli is a terminal client for MySQL and compatible databases (MariaDB, Percona, TiDB, Apache Doris) that provides auto-completion, syntax highlighting, and a modern command-line experience. It simplifies database interaction for developers and DBAs who work frequently with MySQL-compatible systems.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | dbcli/mycli |
| Owner | dbcli |
| Primary language | Python |
| License | BSD-3-Clause — OSI-approved |
| Stars | 11.9k |
| Forks | 695 |
| Open issues | 11 |
| Latest release | v2.1.1 (2026-07-08) |
| Last updated | 2026-07-08 |
| Source | https://github.com/dbcli/mycli |
What mycli is
Written in Python using prompt_toolkit, mycli offers context-aware SQL completion, fuzzy history search via fzf, Pygments-based syntax highlighting, SSL support, and LLM integration for schema-aware queries. It requires Python 3.10+ and connects via PyMySQL, supporting multiline queries and output redirection.
Get the mycli source
Clone the repository and explore it locally.
git clone https://github.com/dbcli/mycli.gitcd mycli# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Python 3.10+ required; pip/package-manager installation straightforward (pip install mycli[all], brew, apt, dnf, AUR supported).
- First run auto-generates ~/.myclirc config file; users should review SSL settings, keyring password storage, and LLM integration toggles for their security posture.
- Optional dependencies (fzf, Pygments) enhance UX but are not required; plan installation strategy based on OS package availability.
- Windows support is partial/unsupported; native Windows users may encounter issues. WSL2 or macOS/Linux strongly preferred.
- Credentials stored in system keyring when enabled; ensure host OS keyring is secured and documented for team access policies.
When to avoid it — and what to weigh
- Scripted or CI/CD automation pipelines — Mycli is designed for interactive terminal use. For automation, use mysql CLI client or programmatic libraries (PyMySQL, SQLAlchemy); interactive features add overhead.
- Production incident response at scale — Not designed for high-throughput batch operations or complex stored procedure debugging. Better suited for ad-hoc queries; heavy transactional load testing should use native drivers.
- Non-MySQL database ecosystems — Specific to MySQL and MySQL-compatible databases. For PostgreSQL, use pgcli; for other databases, use native or language-specific tools.
- Teams requiring fully offline operation — LLM feature and some optional dependencies may require network access. Limited Windows/WSL support means native Windows deployments need testing and PR support.
License & commercial use
BSD-3-Clause (Revised License). This is a permissive OSI-approved license allowing commercial use, modification, and distribution, provided copyright notice and license text are retained and the disclaimer is included.
BSD-3-Clause permits commercial use. No license restrictions on deploying mycli in commercial environments (e.g., bundling with paid tools, internal enterprise use). However, verify that all dependencies (PyMySQL, prompt_toolkit, Pygments, fzf, Click) are also compatible with your commercial use case; each has its own license (typically permissive, but requires review).
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Mycli stores credentials via system keyring when enabled (no plaintext in config by default). SSL/TLS support for encrypted MySQL connections is available. Passwords can be entered interactively or via keyring. LLM feature sends schema context to external service—review data privacy before enabling. No known CVEs reported in provided data, but dependencies (PyMySQL, prompt_toolkit) should be kept updated. No formal security audit mentioned.
Alternatives to consider
pgcli
Equivalent tool for PostgreSQL. Use if primary database is PostgreSQL instead of MySQL.
Native mysql CLI
Built-in, no installation required. Lacks auto-completion, syntax highlighting, and modern UX; suitable for scripts/automation rather than interactive development.
DBeaver / DataGrip
Full-featured database IDEs with GUI, multi-database support, and visual query builders. Heavier weight; better for complex schema exploration but overkill for CLI-first workflows.
Build on mycli with DEV.co software developers
Review the implementation checklist and security considerations above. For production deployments, test on your target platform (macOS/Linux preferred) and verify all dependencies meet your license compliance requirements.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
mycli FAQ
Can I use mycli in production scripts?
Does mycli work on Windows?
How do I save and reuse queries?
What databases does mycli support?
Software development & web development with DEV.co
DEV.co helps companies turn open-source tools like mycli into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source databases stack.
Evaluate Mycli for Your Team
Review the implementation checklist and security considerations above. For production deployments, test on your target platform (macOS/Linux preferred) and verify all dependencies meet your license compliance requirements.