mycli

Rich MySQL Terminal Client with AutoCompletion, Syntax Highlighting, and Dataframes

What is mycli?

Rich MySQL Terminal Client with AutoCompletion, Syntax Highlighting, and Dataframes

Overview of mycli

What it is

mycli is a rich MySQL terminal client that provides auto-completion, syntax highlighting, and dataframe capabilities. It is compatible with MySQL, MariaDB, Percona, TiDB, and Apache Doris. The project is open source and released under the BSD 3-Clause License.

Key features

  • Auto-completion for SQL keywords, tables, views, columns, enums, and more as you type.
  • Smart-completion that suggests context-sensitive completions (e.g., only table names after FROM).
  • Fuzzy history search using fzf.
  • Syntax highlighting using Pygments.
  • Multiline query support.
  • Favorite queries with positional or named parameters using Jinja templates.
  • Polars dataframe transforms and plots, and Parquet saves.
  • Querying LLMs with context derived from your schema via the /llm command.
  • Storing passwords in the system keyring.
  • Modern defaults such as UTF-8 connection type and SSL.
  • Integrations with SSH, Kubernetes, Vault, and Boundary.

Use cases

  • Writing and executing SQL queries with real-time auto-completion and syntax highlighting.
  • Exploring database schemas and tables with smart-completion.
  • Analyzing query results using Polars dataframes for transforms, plots, and Parquet export.
  • Saving and reusing frequently run queries with parameter substitution.
  • Searching through command history with fuzzy matching.
  • Querying LLMs with schema context to assist in query formulation.
  • Managing database connections with support for SSH, Kubernetes, Vault, and Boundary.

Getting started

Install mycli via pip (recommended):

pip install --upgrade 'mycli[all]'

On macOS:

brew update && brew install mycli pygments

On Debian or Ubuntu:

apt-get install mycli fzf python3-pygments

Try without installing using uv:

uv tool run 'mycli[all]' --help

Or using Docker:

docker run --pull=always -it ghcr.io/dbcli/mycli:latest

A configuration file ~/.myclirc is created on the first run.

License and pricing

mycli is open source software provided under the BSD 3-Clause License. It is free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/dbclimycli.svg)](https://yunodb.com/tools/dbclimycli?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/dbclimycli?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/dbclimycli.svg" alt="Featured on YunoDB" height="20"></a>