Alternatives to pgcli

A command-line PostgreSQL client with auto-completion and syntax highlighting. The listings below can replace it for an important use case. Each note says what changes if you switch.

The original

Replacements

Listings that take over the same core job as pgcli.

  • 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 a direct replacement.