7,363 open-source and SaaS tools, with GitHub stats refreshed every day.

Pgcli

Open source

A command-line client for PostgreSQL that adds autocompletion and syntax highlighting to the interactive terminal experience.

pgcli.com
Pgcli homepage screenshot
GitHub stars
13k
Last commit
12 days ago
Repository age
12 years
Version
v4.7.1
Licence
BSD-3-Clause
Self-hosted
Yes

About Pgcli

Pgcli is a command-line interface for PostgreSQL databases written in Python. It is an interactive terminal client that suggests completions for SQL keywords, tables and columns as you type and colors queries with syntax highlighting, which makes ad hoc querying faster than with a plain prompt.

It is licensed under the BSD 3-Clause licence and installed on your own machine as a Python package, with no server component to host. It is aimed at developers and database administrators who spend time in the terminal running queries against local or remote Postgres instances.

Key features

  • Autocompletion for SQL keywords, tables and columns
  • Syntax highlighting in the terminal
  • Interactive command-line client for PostgreSQL
  • Installs as a Python package

Good fit for

  • →Running ad hoc queries against Postgres
  • →Exploring database schemas from the terminal
Tags
postgresql
cli
autocompletion
syntax-highlighting
python
database
terminal

Pgcli: questions and answers

What is Pgcli used for?
Pgcli is a command-line client for PostgreSQL that adds autocompletion and syntax highlighting to the interactive terminal experience. It is a good fit for running ad hoc queries against Postgres and exploring database schemas from the terminal.
Is Pgcli open source?
Yes. Pgcli is open source under the BSD-3-Clause licence. Its source code is on GitHub at dbcli/pgcli and is written mainly in Python.
Is Pgcli free?
Yes. Pgcli is open source, so the software itself is free to use.
What are some alternatives to Pgcli?
Similar open-source tools in the Database Tools category include Mycli, Harlequin and Goose. SaaS products in the same category include AI2sql, Aqua Data Studio and DBCode.
Is Pgcli actively maintained?
Yes. The most recent commit to Pgcli was on 20 September 2026, and the latest release is v4.7.1, published on 20 September 2026. The project has 13k stars on GitHub.

Open-source alternatives to Pgcli

See all

SaaS alternatives to Pgcli

See all