Install
Compatibility:
Mycli is tested on macOS and Linux. It runs on Python 3.10+.
Some testing is also done on Windows and WSL, but there are known limitations.
Other Software:
You may also want to install less and fzf for pager support and fuzzy history
search. less is usually installed by default on Mac and Linux systems.
less or some other pager is essentially a requirement. fzf is not a
requirement, but is highly recommended. pygments can also work with fzf
to colorize fuzzy history search.
Python Package:
The recommended way to install mycli is via the pip package manager (installation instructions for pip), or Homebrew on macOS.
You might need sudo for pip:
$ pip install --upgrade 'mycli[all]'
To install specific versions, you may use e.g.
$ pip install 'mycli[all]==1.20.0'
The [all] ensures that optional extras such as LLM support are installed.
If you don't want the extras, [all] can be omitted.
macOS
The easiest way install mycli on a Mac is to use Homebrew.
The Homebrew package is kept closely up-to-date with the pip package on PyPi, so Homebrew is a very good option. Some optional recommended packages are included in the below command:
$ brew update && brew install mycli fzf pygments
Linux
Mycli is provided by OS package maintainers in many distributions. These packages could be substantially out of date compared to pip/PyPi.
Arch, Manjaro
You can install mycli and recommended other packages from the AUR:
yay -S mycli fzf python-pygments
Debian, Ubuntu
On Debian and Ubuntu distributions, you can install mycli and recommended
other packages using apt:
sudo apt-get install mycli fzf python3-pygments
Fedora
Fedora has a package available for mycli; you can install it and recommended
other packages using dnf:
sudo dnf install mycli fzf python-pygments
Windows
Option 1: Native Windows
Install the less pager, for example by running scoop install less.
Follow the instructions on this blogpost: https://web.archive.org/web/20221006045208/https://www.codewall.co.uk/installing-using-mycli-on-windows/
The libraries used in mycli are Windows-compatible, but there are known limitations according to the test suite. The basics work without any modifications, but this configuration isn't supported software at this time.
PRs to address shortcomings on Windows would be welcome!
Option 2: WSL
Mycli is more compatible with WSL than with native Windows, though still not 100% perfect. This is a good option for using mycli on Windows.
PRs to complete WSL support would be welcome!