๐ŸŒ
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%
Discussions

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
๐ŸŒ r/Python
13
70
January 6, 2015
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.com
๐ŸŒ r/PostgreSQL
4
8
December 26, 2017
Pgcli - 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
๐ŸŒ r/programming
22
45
January 6, 2015
pgcli: Postgres CLI with autocompletion and syntax highlighting
I use this and it's awesome. More on reddit.com
๐ŸŒ r/commandline
6
46
April 1, 2019
๐ŸŒ
Terminal Trove
terminaltrove.com โ€บ home โ€บ macos โ€บ pgcli
pgcli - A postgres CLI with autocompletion and syntax highlighting. - Terminal Trove
May 26, 2025 - pgcli is a command-line PostgreSQL client with auto-completion and syntax colouring, built for quick interactive querying directly from the terminal.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ pgcli-python-package-for-a-interactive-postgres-cli
PGCLI: Python package for a interactive Postgres CLI - GeeksforGeeks
July 23, 2025 - PGCLI is a Python package that is used as an interactive command-line interface for the PostgreSQL database server. For following with the article, make sure you have PostgreSQL installed and set up in your local system.
๐ŸŒ
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.
๐ŸŒ
Homebrew
formulae.brew.sh โ€บ formula โ€บ pgcli
Homebrew Formulae: pgcli
brew install pgcli ยท CLI for Postgres with auto-completion and syntax highlighting ยท https://pgcli.com/ License: BSD-3-Clause ยท Development: Pull requests ยท Formula JSON API: /api/formula/pgcli.json ยท Formula code: pgcli.rb on GitHub ยท
๐ŸŒ
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
Find elsewhere
๐ŸŒ
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 ...
๐ŸŒ
DBI Services
dbi-services.com โ€บ accueil โ€บ simplifying postgresql management: a guide to install and use pgcli
Simplifying PostgreSQL Management: A Guide to Install and Use pgcli
August 18, 2023 - Learn how to simplify your PostgreSQL database management using pgcli, a user-friendly command-line tool. This guide covers the installation and usage of pgcli.
๐ŸŒ
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.
๐ŸŒ
Hoop
hoop.dev โ€บ blog โ€บ pgcli-team-lead-responsibilities-and-impact
Pgcli Team Lead Responsibilities and Impact
October 16, 2025 - Pgcli, the popular CLI for Postgres, is more than a command-line shell. Itโ€™s a tool that rewrites how you interact with your database. A strong Pgcli Team Lead shapes that experience.
๐ŸŒ
AgentGIF
agentgif.com โ€บ explore โ€บ @agentgif โ€บ pgcli โ€” pgcli vs psql
pgcli โ€” pgcli vs psql โ€” AgentGIF
March 13, 2026 - pgcli enhances the psql experience with auto-completion, syntax highlighting, and formatted table output. Compare pgcli and psql for querying PostgreSQL.
๐ŸŒ
Hoop
hoop.dev โ€บ blog โ€บ role-based-access-control-in-pgcli-for-postgresql
Role-Based Access Control in pgcli for PostgreSQL
October 16, 2025 - Pgcli is a command-line interface for PostgreSQL with autocomplete and syntax highlighting. When combined with RBAC, it becomes a fast, secure way to manage permissions without sacrificing speed or control.
๐ŸŒ
Medium
medium.com โ€บ @kristina.a.albrecht โ€บ loading-data-to-postgres-db-using-pgcli-446b29593050
Loading data to Postgres DB using pgcli | by Kristina Albrecht | Medium
January 27, 2023 - pgcli is a command-line interface (CLI) for interacting with PostgreSQL databases, similar to the psql command-line utility that isโ€ฆ
๐ŸŒ
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 ยท
๐ŸŒ
Hoop
hoop.dev โ€บ blog โ€บ auto-remediation-workflows-with-pgcli
Auto-Remediation Workflows with Pgcli
August 26, 2025 - Combining auto-remediation workflows with pgcli creates a powerful system to address common database issues. Since pgcli offers an efficient way to execute commands, it provides a smooth surface on which automation can operate.
๐ŸŒ
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