pgcli
github.com
1
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
pgcli is a command-line interface for PostgreSQL with auto-completion and syntax highlighting. Developed by Amjith Ramanujam (dbcli organization), pgcli has over 12,000 stars as of 2026 and is designed as a modern replacement for the psql command-line client, providing a much more user-friendly interactive experience. Written in Python using the prompt_toolkit library, pgcli offers features that psql lacks, making PostgreSQL administration and querying significantly more pleasant. Key features include: smart auto-completion (context-aware suggestions for SQL keywords, table names, column names, functions, and aliases as you type, powered by a SQL parser that understands the query structure), syntax highlighting (colorizing SQL keywords, strings, numbers, operators, and comments for improved readability), multi-line query editing with proper indentation, query history with reverse search (Ctrl+R), favorite queries (saving frequently used queries with names), tabular output with aligned columns and column type-aware formatting, expanded display mode (\x for vertical output of wide tables), automatic connection to default PostgreSQL instance, connection string support (pgcli postgresql://user:pass@host:port/dbname), SSL/TLS connection support, pager integration (using less for large result sets), meta-commands (similar to psql: \d for describe, \dt for tables, \l for databases, \i for file execution, \c for connecting, \q for quit), auto-detection of connection parameters from environment variables, and vi and emacs keybinding modes.
Statistics
1
Views
0
Clicks
0
Like
0
Dislike