# dbcli/pgcli

Postgres CLI with autocompletion and syntax highlighting

Repository: https://github.com/dbcli/pgcli
Canonical: https://ross.abutalabs.com/products/pgcli
Homepage: http://pgcli.com
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: python, postgresql, postgres, psql, database
Last push: 2026-08-26T16:07:56+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 4343, "days_push": 7, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 13366, forks 605 (observed 2026-08-28T04:11:03.203407+00:00)

## What it is
pgcli is a command-line REPL client for PostgreSQL that provides context-sensitive auto-completion and syntax highlighting as you type SQL queries. It is a modern, friendlier alternative to psql, supporting backslash meta-commands, query history, named queries, and SSH tunneling.

## Use cases
- query postgres from the terminal with autocomplete
- a better psql alternative with syntax highlighting
- interactive SQL REPL for postgres
- explore database schema from the command line
- run postgres queries with smart completion
- connect to postgres over an SSH tunnel from CLI

## When to choose
- you work with PostgreSQL daily and want a smarter terminal client than psql
- you want context-aware completion of tables, columns, and keywords while writing SQL
- you want a lightweight CLI instead of a GUI database tool

## When to avoid
- you need a MySQL or SQLite client (use mycli or litecli instead)
- you require a graphical interface for browsing and editing data
- you need advanced psql features or exact psql script compatibility

## Facets
- artifact type: cli-tool
- maturity: active
- function: database, database-driver, cli
- domain: databases, developer-tools
- platform: windows, cli, python
- tags: postgres, psql, repl, autocompletion, syntax-highlighting, sql-client, command-line, linux, macos

## Member repositories
- dbcli/pgcli (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:03.203407+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:13:20.450059+00:00, confidence not recorded.
  - readme: https://github.com/dbcli/pgcli (fetched 2026-08-28T04:11:03.203407+00:00, sha 843a2baea31f)
  - homepage: http://pgcli.com (fetched 2026-08-29T08:08:26.869754+00:00, sha 69002c40b004)
  - site_page: https://www.pgcli.com/install (fetched 2026-08-29T08:08:26.878836+00:00, sha d89a4284c9da)
  - site_page: https://www.pgcli.com/docs (fetched 2026-08-29T08:08:26.880719+00:00, sha 7eda03de1526)
  - site_page: https://www.pgcli.com/about (fetched 2026-08-29T08:08:26.885017+00:00, sha 8694e483956d)
  - site_page: https://www.pgcli.com/faq (fetched 2026-08-29T08:08:26.882877+00:00, sha 32e03af3d91a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
