pgcli Interactive PostgreSQL Client with Autocompletion
pgcli is an interactive PostgreSQL CLI with context-aware autocompletion, syntax highlighting, and multi-line query editing. Part of the dbcli project with 13k+ GitHub stars, it makes database exploration and query writing dramatically more productive.
Installation
Use the upstream install or setup path that matches your environment:
- $ pip install -U pgcli
- $ brew install pgcli # Only on macOS
- $ brew install pgcli
- $ pip install pgcli
Requirements and caveats from upstream:
- If you already know how to install python packages, then you can simply do:
- If you don't know how to install python packages, please check the
- .. _prompt_toolkit: https://github.com/jonathanslenders/python-prompt-toolkit
Basic usage or getting-started notes:
::
or
Source: https://github.com/dbcli/pgcli
Extracted from upstream docs: https://raw.githubusercontent.com/dbcli/pgcli/HEAD/README.rst