Stack Gems
Menu
← Catalog

pgcli

BSD-3-Clause Postgres CLI with smart autocompletion

Databases / Data · BSD-3-Clause · 13.4k

Reviewed 2026-10-18 · last push 2026-10-15 · repo checked 2026-10-19

What's Good

BSD-3-Clause (dbcli/pgcli), release v4.7.1 (2026-09-20), maintained since 2014. Install with pip, apt or brew, then connect with the same arguments as psql. It is context-aware (suggests columns from the tables in your FROM clause), supports most backslash commands, named queries, pagers, multi-line editing and vi/emacs keys. Sibling project mycli does the same for MySQL. ★~13.4k.

The Catch

It is a Python app, so startup is slower than psql and you need a Python environment. Some psql meta-commands and scripting behaviours differ, so keep psql for scripts. Huge schemas can make the completion refresh slow.

Verdict

Install it once and you will stop using bare psql for interactive work.

Embed

Maintainer? Add the badge to your README. It is free, links to this review, and there is no paid version.

Reviewed on Stack Gems

Markdown

[![Reviewed on Stack Gems](https://stackgems.com/badge/pgcli.svg)](https://stackgems.com/gems/pgcli)

HTML

<a href="https://stackgems.com/gems/pgcli"><img src="https://stackgems.com/badge/pgcli.svg" alt="pgcli reviewed on Stack Gems" height="20"></a>