finds.dev← search

// the find

dbcli/pgcli

★ 13,216 · Python · BSD-3-Clause · updated Jun 2026

Postgres CLI with autocompletion and syntax highlighting

pgcli is a terminal client for Postgres that replaces psql with context-aware autocompletion and syntax highlighting. It knows the difference between `SELECT * FROM <tab>` (show tables) and `WHERE <tab>` (show columns), which sounds obvious but psql has never bothered. For anyone who spends real time in a Postgres shell, this is the first thing you should install.

Smart completion is genuinely useful — it queries your actual schema and distinguishes context so completions are relevant, not just keyword dumps. The IPython integration is a real feature: drop into a pgcli session mid-notebook, run a query, exit, and the results are in your workspace. Destructive query warnings (`--warn all`) catch `DELETE FROM users` without a WHERE before you hit Enter. Maintained actively — last push was 10 days ago, CI/CD is set up properly, and it has real behavioral test coverage using Behave feature files against a live database.

Startup time is noticeably slower than psql because it has to introspect the schema on connect — on databases with hundreds of tables and schemas this gets annoying fast. The `\` backslash command support is described as 'primitive' in the README and that's accurate: you'll hit gaps if you rely heavily on psql meta-commands. No support for multiple simultaneous connections or session switching — you get one connection per process. Configuration lives in a hand-edited rc file with no documentation beyond the comments in the file itself; anything non-obvious requires reading source.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →