pgcli

A command-line PostgreSQL client with auto-completion and syntax highlighting.

These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.

1 more ways to get pgcli

Package managers

About pgcli

pgcli is a terminal interface for Postgres that adds auto-completion and syntax highlighting to the interactive SQL prompt, as an alternative to the standard psql shell. It reads the usual libpq environment variables for connection settings.

It installs with pip or on macOS through Homebrew, which also installs PostgreSQL if it is not already present. pgcli is part of the DBCLI project alongside mycli and litecli, and suits developers and administrators who query Postgres from the terminal.

Strengths

  • Context-aware auto-completion for SQL
  • Syntax highlighting in the terminal
  • Uses standard libpq connection environment variables

Limitations

  • Terminal only, no graphical interface
  • Homebrew install also pulls in PostgreSQL

Details

Pricing
FreeFree and open source.
License
Open source, license not stated
Developer
The DBCLI contributors
Platforms
Command line
How it runs
Downloadable app
Account
Not required
Best suited for
Querying PostgreSQL from the terminal with less typing
Last verified
Added
Provenance
Facts checked against the developer's own pages and store listings, 1 sources on file.

Alternatives to pgcli

Compare all

Software that can replace pgcli for an important use case, and what changes if you switch.

  • usql

    Use one command-line interface for many database systems.

    usql gives one command-line interface for many database systems instead of PostgreSQL only, though driver availability and feature support vary by database.

  • Harlequin

    A SQL IDE that runs in the terminal, with adapters for DuckDB, SQLite, Postgres and more.

    Harlequin is a full SQL IDE in the terminal with adapters for Postgres, DuckDB, SQLite and more, installed through Python like pgcli.

  • rainfrog

    Query databases through a terminal editor with history and favorites.

    rainfrog is a terminal query editor with query history, favorites and table inspection, though its database drivers have different support and stability levels.

  • dblab

    An open-source terminal UI client for browsing and querying PostgreSQL, MySQL, SQLite and other databases.

    dblab is a terminal UI for browsing and querying PostgreSQL, MySQL and SQLite with saved connection configs, maintained by a small team.

  • LazySQL

    Browse and query databases through a terminal interface.

    LazySQL is a cross-platform terminal interface for browsing and querying databases, but the project describes itself as alpha software.

Similar software

Related functionality, not necessarily a direct replacement.

Report a wrong fact or a dead link on this listing