About Mycli
Mycli is an interactive command-line client for MySQL written in Python. It completes SQL keywords, tables, views, columns and more as you type, and its smart completion suggests only what makes sense in context, for example showing table names after a FROM clause and column names after WHERE.
It highlights syntax with Pygments, supports multiline queries, favorite queries with parameters, fuzzy history search with fzf, timing of statements and many output formats. Newer releases add Polars dataframe transforms and plots, Parquet saves, queries to LLMs with schema context via a /llm command, passwords stored in the system keyring, and integrations with SSH, Kubernetes, Vault and Boundary.
Mycli is compatible with MySQL, MariaDB, Percona, TiDB and Apache Doris, and has a sibling tool, pgcli, for Postgres. It is released under the BSD 3-Clause licence and installed with pip or system packages, or tried through uv or a container image. The README warns that release 2.0 contains breaking changes.
Key features
- Context-aware SQL autocompletion
- Syntax highlighting with Pygments
- Fuzzy history search using fzf
- Favorite queries with parameters
- Polars dataframe transforms and plots
- LLM queries using schema context
- Passwords stored in system keyring
Good fit for
- →Running ad hoc MySQL queries in the terminal
- →Exploring MariaDB or TiDB schemas
- →Quick data analysis with dataframe output
- Tags
- mysql
- cli
- autocompletion
- syntax-highlighting
- python
- sql-client
- terminal
- mariadb
Mycli: questions and answers
- What is Mycli used for?
- Mycli is a MySQL terminal client with context-aware autocompletion, syntax highlighting and dataframe support, also compatible with MariaDB, Percona and TiDB. It is a good fit for running ad hoc MySQL queries in the terminal, exploring MariaDB or TiDB schemas and quick data analysis with dataframe output.
- Is Mycli open source?
- Yes. Mycli is open source under the BSD-3-Clause licence. Its source code is on GitHub at dbcli/mycli and is written mainly in Python.
- Is Mycli free?
- Yes. Mycli is open source, so the software itself is free to use.
- What are some alternatives to Mycli?
- Similar open-source tools in the Database Tools category include Pgcli, Harlequin and Beekeeper Studio. SaaS products in the same category include Querious, SQLyog and DBCode.
- Is Mycli actively maintained?
- Yes. The most recent commit to Mycli was on 2 October 2026, and the latest release is v2.27.0, published on 29 September 2026. The project has 12k stars on GitHub.
Open-source alternatives to Mycli
See all
Pgcli
Database Tools
Postgres CLI with autocompletion and syntax highlighting
BSD-3-Clause★ 13k
Harlequin
Database Tools
The SQL IDE for Your Terminal. Now with hsql, your agent's favorite sql client.
MITvs DataGrip★ 6.4k
Beekeeper Studio
Database Tools
Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux
OSSvs DataGrip★ 24k
Goose
Database Tools
A database migration tool. Supports SQL migrations and Go functions.
OSS★ 12k
phpMyAdmin
Database Tools
A web interface for MySQL and MariaDB
GPL-2.0vs Navicat★ 7.9k
Sequel Ace
Database Tools
MySQL/MariaDB database management for macOS
OSSvs TablePlus★ 7.5k
SaaS alternatives to Mycli
See all
Querious
Database Tools
MySQL and MariaDB database management app for macOS
SaaSSQLyog
Database Tools
MySQL and MariaDB GUI client for Windows with schema and data sync tools
SaaS
DBCode
Database Tools
VS Code extension for browsing and querying databases
SaaS
dbForge Studio
Database Tools
Devart IDE suite for developing and managing MySQL, SQL Server, Oracle and PostgreSQL
SaaS
DbVisualizer
Database Tools
Universal database client with a free edition and a paid Pro tier
SaaS
Navicat
Database Tools
Database administration and development client for many SQL and NoSQL systems
SaaS

