mycli


Namemycli JSON
Version 1.36.0 PyPI version JSON
download
home_pageNone
SummaryCLI for MySQL Database. With auto-completion and syntax highlighting.
upload_time2025-07-19 15:45:42
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mycli

[![Build Status](https://github.com/dbcli/mycli/workflows/mycli/badge.svg)](https://github.com/dbcli/mycli/actions?query=workflow%3Amycli)

A command line client for MySQL that can do auto-completion and syntax highlighting.

Homepage: [http://mycli.net](http://mycli.net)
Documentation: [http://mycli.net/docs](http://mycli.net/docs)

![Completion](screenshots/tables.png)
![CompletionGif](screenshots/main.gif)

Postgres Equivalent: [http://pgcli.com](http://pgcli.com)

Quick Start
-----------

If you already know how to install Python packages, then you can install it via `pip`:

You might need sudo on Linux.

```bash
$ pip install -U mycli
```

or

```bash
$ brew update && brew install mycli  # Only on macOS
```

or

```bash
$ sudo apt-get install mycli  # Only on Debian or Ubuntu
```

### Usage

See

```bash
$ mycli --help
```

Features
--------

`mycli` is written using [prompt_toolkit](https://github.com/jonathanslenders/python-prompt-toolkit/).

* Auto-completion as you type for SQL keywords as well as tables, views and
  columns in the database.
* Syntax highlighting using Pygments.
* Smart-completion (enabled by default) will suggest context-sensitive completion.
    - `SELECT * FROM <tab>` will only show table names.
    - `SELECT * FROM users WHERE <tab>` will only show column names.
* Support for multiline queries.
* Favorite queries with optional positional parameters. Save a query using
  `\fs alias query` and execute it with `\f alias` whenever you need.
* Timing of sql statements and table rendering.
* Config file is automatically created at ``~/.myclirc`` at first launch.
* Log every query and its results to a file (disabled by default).
* Pretty prints tabular data (with colors!)
* Support for SSL connections
* Shell-style trailing redirects with `$>`, `$>>` and `$|` operators.
* Some features are only exposed as [key bindings](doc/key_bindings.rst)

Contributions:
--------------

If you're interested in contributing to this project, first of all I would like
to extend my heartfelt gratitude. I've written a small doc to describe how to
get this running in a development setup.

https://github.com/dbcli/mycli/blob/main/CONTRIBUTING.md


## Additional Install Instructions:

These are some alternative ways to install mycli that are not managed by our team but provided by OS package maintainers. These packages could be slightly out of date and take time to release the latest version.

### Arch, Manjaro

You can install the mycli package available in the AUR:

```
$ yay -S mycli
```

### Debian, Ubuntu

On Debian, Ubuntu distributions, you can easily install the mycli package using apt:

```
$ sudo apt-get install mycli
```

### Fedora

Fedora has a package available for mycli, install it using dnf:

```
$ sudo dnf install mycli
```

### Windows

Follow the instructions on this blogpost: http://web.archive.org/web/20221006045208/https://www.codewall.co.uk/installing-using-mycli-on-windows/


### Thanks:

This project was funded through kickstarter. My thanks to the [backers](http://mycli.net/sponsors) who supported the project.

A special thanks to [Jonathan Slenders](https://twitter.com/jonathan_s) for
creating [Python Prompt Toolkit](http://github.com/jonathanslenders/python-prompt-toolkit),
which is quite literally the backbone library, that made this app possible.
Jonathan has also provided valuable feedback and support during the development
of this app.

[Click](http://click.pocoo.org/) is used for command line option parsing
and printing error messages.

Thanks to [PyMysql](https://github.com/PyMySQL/PyMySQL) for a pure python adapter to MySQL database.


### Compatibility

Mycli is tested on macOS and Linux, and requires Python 3.9 or better.

**Mycli is not tested on Windows**, but the libraries used in this app are Windows-compatible.
This means it should work without any modifications. If you're unable to run it
on Windows, please [file a bug](https://github.com/dbcli/mycli/issues/new).

### Configuration and Usage

For more information on using and configuring mycli, [check out our documentation](http://mycli.net/docs).

Common topics include:
- [Configuring mycli](http://mycli.net/config)
- [Using/Disabling the pager](http://mycli.net/pager)
- [Syntax colors](http://mycli.net/syntax)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mycli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Mycli Core Team <mycli-dev@googlegroups.com>",
    "download_url": "https://files.pythonhosted.org/packages/97/ef/c487ca8878abab58c695f497f0700f0c95f79fd62392ae5b47550d75e761/mycli-1.36.0.tar.gz",
    "platform": null,
    "description": "# mycli\n\n[![Build Status](https://github.com/dbcli/mycli/workflows/mycli/badge.svg)](https://github.com/dbcli/mycli/actions?query=workflow%3Amycli)\n\nA command line client for MySQL that can do auto-completion and syntax highlighting.\n\nHomepage: [http://mycli.net](http://mycli.net)\nDocumentation: [http://mycli.net/docs](http://mycli.net/docs)\n\n![Completion](screenshots/tables.png)\n![CompletionGif](screenshots/main.gif)\n\nPostgres Equivalent: [http://pgcli.com](http://pgcli.com)\n\nQuick Start\n-----------\n\nIf you already know how to install Python packages, then you can install it via `pip`:\n\nYou might need sudo on Linux.\n\n```bash\n$ pip install -U mycli\n```\n\nor\n\n```bash\n$ brew update && brew install mycli  # Only on macOS\n```\n\nor\n\n```bash\n$ sudo apt-get install mycli  # Only on Debian or Ubuntu\n```\n\n### Usage\n\nSee\n\n```bash\n$ mycli --help\n```\n\nFeatures\n--------\n\n`mycli` is written using [prompt_toolkit](https://github.com/jonathanslenders/python-prompt-toolkit/).\n\n* Auto-completion as you type for SQL keywords as well as tables, views and\n  columns in the database.\n* Syntax highlighting using Pygments.\n* Smart-completion (enabled by default) will suggest context-sensitive completion.\n    - `SELECT * FROM <tab>` will only show table names.\n    - `SELECT * FROM users WHERE <tab>` will only show column names.\n* Support for multiline queries.\n* Favorite queries with optional positional parameters. Save a query using\n  `\\fs alias query` and execute it with `\\f alias` whenever you need.\n* Timing of sql statements and table rendering.\n* Config file is automatically created at ``~/.myclirc`` at first launch.\n* Log every query and its results to a file (disabled by default).\n* Pretty prints tabular data (with colors!)\n* Support for SSL connections\n* Shell-style trailing redirects with `$>`, `$>>` and `$|` operators.\n* Some features are only exposed as [key bindings](doc/key_bindings.rst)\n\nContributions:\n--------------\n\nIf you're interested in contributing to this project, first of all I would like\nto extend my heartfelt gratitude. I've written a small doc to describe how to\nget this running in a development setup.\n\nhttps://github.com/dbcli/mycli/blob/main/CONTRIBUTING.md\n\n\n## Additional Install Instructions:\n\nThese are some alternative ways to install mycli that are not managed by our team but provided by OS package maintainers. These packages could be slightly out of date and take time to release the latest version.\n\n### Arch, Manjaro\n\nYou can install the mycli package available in the AUR:\n\n```\n$ yay -S mycli\n```\n\n### Debian, Ubuntu\n\nOn Debian, Ubuntu distributions, you can easily install the mycli package using apt:\n\n```\n$ sudo apt-get install mycli\n```\n\n### Fedora\n\nFedora has a package available for mycli, install it using dnf:\n\n```\n$ sudo dnf install mycli\n```\n\n### Windows\n\nFollow the instructions on this blogpost: http://web.archive.org/web/20221006045208/https://www.codewall.co.uk/installing-using-mycli-on-windows/\n\n\n### Thanks:\n\nThis project was funded through kickstarter. My thanks to the [backers](http://mycli.net/sponsors) who supported the project.\n\nA special thanks to [Jonathan Slenders](https://twitter.com/jonathan_s) for\ncreating [Python Prompt Toolkit](http://github.com/jonathanslenders/python-prompt-toolkit),\nwhich is quite literally the backbone library, that made this app possible.\nJonathan has also provided valuable feedback and support during the development\nof this app.\n\n[Click](http://click.pocoo.org/) is used for command line option parsing\nand printing error messages.\n\nThanks to [PyMysql](https://github.com/PyMySQL/PyMySQL) for a pure python adapter to MySQL database.\n\n\n### Compatibility\n\nMycli is tested on macOS and Linux, and requires Python 3.9 or better.\n\n**Mycli is not tested on Windows**, but the libraries used in this app are Windows-compatible.\nThis means it should work without any modifications. If you're unable to run it\non Windows, please [file a bug](https://github.com/dbcli/mycli/issues/new).\n\n### Configuration and Usage\n\nFor more information on using and configuring mycli, [check out our documentation](http://mycli.net/docs).\n\nCommon topics include:\n- [Configuring mycli](http://mycli.net/config)\n- [Using/Disabling the pager](http://mycli.net/pager)\n- [Syntax colors](http://mycli.net/syntax)\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "CLI for MySQL Database. With auto-completion and syntax highlighting.",
    "version": "1.36.0",
    "project_urls": {
        "homepage": "http://mycli.net"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fb5c27f2e54ec067c2c6b4ee28459961f0a873510b52effed8fa99aa39eea120",
                "md5": "289a5158228dff18db4efffea34b281d",
                "sha256": "aa62fd606000c1463ed3268c7ff9cb329be5af71316881e265d03f09bec8403f"
            },
            "downloads": -1,
            "filename": "mycli-1.36.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "289a5158228dff18db4efffea34b281d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 76918,
            "upload_time": "2025-07-19T15:45:41",
            "upload_time_iso_8601": "2025-07-19T15:45:41.153647Z",
            "url": "https://files.pythonhosted.org/packages/fb/5c/27f2e54ec067c2c6b4ee28459961f0a873510b52effed8fa99aa39eea120/mycli-1.36.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "97efc487ca8878abab58c695f497f0700f0c95f79fd62392ae5b47550d75e761",
                "md5": "01eb8430be97d23b64bf8f8844eb0341",
                "sha256": "43c321c9c3dd8d63d4576d540b289916998af28aa2a84b0f973b775830f154f5"
            },
            "downloads": -1,
            "filename": "mycli-1.36.0.tar.gz",
            "has_sig": false,
            "md5_digest": "01eb8430be97d23b64bf8f8844eb0341",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 298806,
            "upload_time": "2025-07-19T15:45:42",
            "upload_time_iso_8601": "2025-07-19T15:45:42.473531Z",
            "url": "https://files.pythonhosted.org/packages/97/ef/c487ca8878abab58c695f497f0700f0c95f79fd62392ae5b47550d75e761/mycli-1.36.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-19 15:45:42",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mycli"
}
        
Elapsed time: 1.09151s