Skip to content

pgcli

Data & DBDatabase

Postgres shell, autocomplete, and readable results from the terminal.

Postgres shell, autocomplete, and readable results from the terminal. Built by dbcli.

Task fit

postgres shell, autocomplete, and readable results from the terminal.

Lane

Inspect schemas, run safe queries, and understand your data fast.

Operator brief

Use pgcli for postgres shell, autocomplete, and readable results from the terminal.

Run `pgcli postgres://localhost/postgres` and see what comes back.

Repository family

dbcli

First trust check

pgcli responds locally before you point it at a database.

Safe first loop

Install, verify, then run one real command.

Safe database loop

Install command

$ pipx install pgcli

Operator pack

Copy or export the working notes for this CLI before handing it to an agent.

Verify

$ pgcli --version

pgcli responds locally before you point it at a database.

First real command

$ pgcli postgres://localhost/postgres

First steps

  1. 01Install pgcli.
  2. 02Run `pgcli --version` first.
  3. 03Start with `pgcli postgres://localhost/postgres`.
  4. 04Install a CLI that matches your database engine.

When to use / hold off when

Best for

postgres shell, autocomplete, and readable results from the terminal.

Use this when

You work with databases and want a fast terminal interface.

Hold off when

You need fully non-interactive usage for CI.

Trust and constraints

trusted80/100
Install readyTrustedCaution
JSON outputNo
Non-interactiveNo
CI-friendlyNo

Why operators pick it

  • pgcli fits data & db well, especially for postgres shell, autocomplete, and readable results from the terminal.
  • 798 homebrew installs (30d).
  • Verify with `pgcli --version` first.

Constraints

  • Automation can be brittle.
  • Output is mostly plain text.
  • Start with read-only or dry-run commands.

Facts and links

Install withpipx
Homebrew installs (30d)798
GitHub stars13.1K
LicenseBSD-3-Clause
UpdatedMar 25, 2026