$npx skillfedfor your agent

pgcli

CLI for Postgres Database. With auto-completion and syntax highlighting.

Worth itPyPI Software DevelopmentReleased Jun 2026647.3K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pgcli-4.5.0-py3-none-any.whl
v4.5.0 · released 2026-06-03 · Python >=3.10 · 11 runtime deps: pgspecial, click, Pygments, prompt_toolkit, psycopg, psycopg-binary, sqlparse, configobj

Yes. pgcli is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. It is a straightforward productivity tool for PostgreSQL users who want a more modern interactive shell than psql. Install it if you regularly work with PostgreSQL from the command line and value auto-completion and syntax highlighting.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a PostgreSQL server to connect to; psycopg (the database driver) must be able to reach a running PostgreSQL instance.
  • Low install friction with a pure Python wheel distribution.
  • Actively maintained with a release within the last 72 days.

License · maintenance · safety

BSD (permissive) — BSD license is permissive, allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2026-06-03 (72 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 647,300 downloads/mo, #5,593 on PyPI

Verify before relying

$ pip install pgcli
$ pgcli local_database

or

$ pgcli postgresql://user:password@host:5432/dbname
  • Whether smart-completion (context-sensitive suggestions based on SQL keywords) works reliably across all query patterns
  • Performance characteristics when connecting to databases with very large schemas (thousands of tables/columns)
  • Extent of psql back-slash command support and which commands are fully implemented
Same gist for agents: .md · .json

What it is and what it does

pgcli is a PostgreSQL client that replaces the standard psql command-line tool with an interactive shell featuring auto-completion and syntax highlighting. It uses prompt_toolkit to provide a modern terminal interface that suggests SQL keywords, table names, and column names as you type, and highlights syntax using Pygments. The tool supports both direct database names and full PostgreSQL connection URIs, environment variables for authentication (PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE), and SSL connection options.

You run it from the command line to open an interactive session with a PostgreSQL database. It displays query results in formatted tables and supports configuration through a config file at ~/.config/pgcli/config. The package is built on established dependencies: psycopg for database connectivity, click for command-line argument parsing, sqlparse for SQL parsing, and cli_helpers for output formatting.

Use it for

  • Interactive database exploration and ad-hoc querying with real-time auto-completion of table and column names
  • Development workflows where syntax highlighting and smart suggestions reduce typing and errors
  • Remote PostgreSQL administration via SSH tunnels or direct connections with SSL support
  • Learning SQL with guided completion that shows available tables and columns in context
  • Scripting and automation via command-line invocation with DSN aliases from config files

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

pgcli is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. It is a straightforward productivity tool for PostgreSQL users who want a more modern interactive shell than psql. Install it if you regularly work with PostgreSQL from the command line and value auto-completion and syntax highlighting.

Install

pgcli on PyPI

Before you install

Low install friction with a pure Python wheel distribution. Actively maintained with a release within the last 72 days. Requires Python 3.10 or later and depends on 11 runtime packages including psycopg for database connectivity and prompt_toolkit for the interactive interface.

Requires a PostgreSQL server to connect to; psycopg (the database driver) must be able to reach a running PostgreSQL instance.

License in practice

BSD license is permissive, allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

$ pip install pgcli
$ pgcli local_database

or

$ pgcli postgresql://user:password@host:5432/dbname

Verify before relying

  • Whether smart-completion (context-sensitive suggestions based on SQL keywords) works reliably across all query patterns
  • Performance characteristics when connecting to databases with very large schemas (thousands of tables/columns)
  • Extent of psql back-slash command support and which commands are fully implemented

Package facts

LicenseBSD permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
11 packages
pgspecialclickPygmentsprompt_toolkitpsycopgpsycopg-binarysqlparseconfigobjcli_helperssetproctitletzlocal
MaintenanceActively maintained 72 days since the last release
First released
Downloads647,300 / month, #5,593 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: SQLTopic :: DatabaseTopic :: Database :: Front-EndsTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python Modules

Evidence: pgcli-4.5.0-py3-none-any.whl

Tags

Capabilities
postgres cli clientpostgresql replsql auto-completionpostgres terminal interfaceinteractive postgres shellpostgres command line toolsql syntax highlighting
Topics
postgres-clientreplcli-tool

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “postgres cli client”

  • pgclipgcli is a command-line interface for PostgreSQL that provides…
  • pgspecialExecutes PostgreSQL meta-commands (backslash commands)…
  • squawk-cliLinter that analyzes PostgreSQL migrations and SQL statements to…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also litecli · pgspecial · mycli · pgsanity · postgres-mcp · pulumi-postgresql · postgres · pgdb · adbc-driver-postgresql · pg8000