Pgcli
pgcli.com
pgcli
Pgcli is a command line interface for Postgres with auto-completion and syntax highlighting.
FAQ
This library provided a way to write CLIs without having to deal with curses and had the requisite tools for doing auto-completion and syntax-highlighting. So I jumped at the opportunity to try it out. After I got myself familiarized, I started writing pgcli to scratch my own itch.
Docs
The config file for pgcli is located in the home folder (~/.config/pgcli/config).
Install
The easiest way install pgcli on an macOS machine is to use Homebrew.
GitHub
github.com โบ dbcli โบ pgcli
GitHub - dbcli/pgcli: Postgres CLI with autocompletion and syntax highlighting ยท GitHub
$ pgcli --help Usage: pgcli [OPTIONS] [DBNAME] [USERNAME] Options: -h, --host TEXT Host address of the postgres database. -p, --port INTEGER Port number at which the postgres instance is listening. -U, --username TEXT Username to connect to the postgres database.
Starred by 13.3K users
Forked by 602 users
Languages ย Python 98.1% | Gherkin 1.4%
pgcli - A CLI for Postgres with autocompletion and syntax highlighting
70 votes, 13 comments. 1.5M subscribers in the Python community. The largest Python community for Reddit! Stay up to date with the latest newsโฆ More on reddit.com
Anybody using pgcli instead of psql?
I use it. Love it. Not sure I am missing anything just gaining. Gaining hints and colours.
More on reddit.comPgcli - A Postgres CLI with Auto-completion and Syntax Highlighting
This would be great if you modified it to take psql-style arguments instead of connection strings! More on reddit.com
pgcli: Postgres CLI with autocompletion and syntax highlighting
I use this and it's awesome. More on reddit.com
Videos
Anaconda.org
anaconda.org โบ conda-forge โบ pgcli
pgcli - conda-forge | Anaconda.org
June 3, 2026 - Install pgcli with Anaconda.org. CLI for Postgres Database. With auto-completion and syntax highlighting.
Reddit
reddit.com โบ r/python โบ pgcli - a cli for postgres with autocompletion and syntax highlighting
r/Python on Reddit: pgcli - A CLI for Postgres with autocompletion and syntax highlighting
January 6, 2015 - I'm planning to do a sweep of the popular destinations for the socket file before falling back to an empty string. https://github.com/amjith/pgcli/issues/37
Arch Linux
archlinux.org โบ packages โบ extra โบ any โบ pgcli
Arch Linux - pgcli 4.5.0-1 (any)
View the file list for pgcli ยท View the soname list for pgcli ยท Copyright ยฉ 2002-2026 Judd Vinet, Aaron Griffin and Levente Polyรกk. The Arch Linux name and logo are recognized trademarks. Some rights reserved.
Docker Hub
hub.docker.com โบ r โบ luyat โบ pgcli
luyat/pgcli - Docker Image
In [2]: %pgcli postgres://someone@localhost:5432/world Connected: someone@world someone@localhost:world> select * from city c where countrycode = 'USA' and population > 1000000; +------+--------------+---------------+--------------+--------------+ | id | name | countrycode | district | population ...
Pgcli
pgcli.com โบ install
Install
Pgcli uses psycopg to talk to postgres database. In order to install psycopg, you will need libpq and python-dev installed on your system.
Pgcli
pgcli.com โบ docs
Docs
The config file for pgcli is located in the home folder (~/.config/pgcli/config).
Hoop
hoop.dev โบ blog โบ pgcli-vs-sqlplus
pgcli vs sqlplus
October 16, 2025 - When comparing pgcli vs sqlplus, the database backend is a decisive factor. pgcli is for PostgreSQL and derivatives. sqlplus is for Oracle. But engineers often work across stacks. Some teams migrate from Oracle to Postgres, or run hybrid systems. In these cases, knowing both tools is useful.
Fedora
packages.fedoraproject.org โบ pkgs โบ pgcli
pgcli - Fedora Packages
pgcli - CLI for Postgres Database. With auto-completion and syntax highlighting ยท python3-pgcli+keyring - Metapackage for python3-pgcli: keyring extras ยท python3-pgcli+sshtunnel - Metapackage for python3-pgcli: sshtunnel extras ยท
GitHub
github.com โบ jim-schwoebel โบ dopg_cli
GitHub - jim-schwoebel/dopg_cli: ๐๐ณ๐ A python command line interface for DigitalOcean postgres clusters (5+ integrations).
November 4, 2022 - ๐๐ณ๐ A python command line interface for DigitalOcean postgres clusters (5+ integrations). - jim-schwoebel/dopg_cli
Author ย jim-schwoebel