pgxcli vs pgcli
pgcli is a mature PostgreSQL CLI developed over many years, which has set the standard for interactive PostgreSQL clients.
pgxcli takes a modern, lightweight approach focused on speed, minimal setup, and a fast CLI experience. It ships as a single Go binary with TOML configuration, and a growing feature set designed for productivity. If you prefer a fast, modern interface with simple setup, pgxcli may be a good fit. For a more mature, battle-tested, and long-established experience, pgcli remains a strong benchmark.
Where pgxcli stands out:
Now
- Single binary: No external runtime dependencies (like Python).
- Performance: Fast startup and better overall performance.
- Modern CLI Interface: Enhanced user experience.
- Large Tables: Performance improvement for larger tables.
Planned
- Streaming query results: Better handling of large tables.
- Browser-based Table view: View results via localhost.
- Direct Table export: Export to SQL INSERT, CSV, MD tables, Excel, and HTML.
Feature Comparison Matrix
| Category | Feature | pgcli (Python) | pgxcli (Go, v0.3.0) | Status |
|---|---|---|---|---|
| TL;DR | Overall | Feature-rich, mature | Fast, simple, single-binary | - |
| SQL Editing | Multi-line mode | Stable | ||
| External editor | (Ctrl+E) | Stable | ||
| Completion | Keyword completion | Stable | ||
| Schema-aware completion | Stable v0.3.0 | |||
| Meta command completion | Stable v0.3.0 | |||
| Output | Pager support | Stable | ||
| Table formatting | Stable | |||
| Colored output + themes | Stable | |||
| Syntax highlighting | (rich) | Stable | ||
| Commands | Backslash meta-commands | Stable Expanding | ||
| Built-in commands | (clear) | Expanding | ||
| History | Persistent history | Stable | ||
| Search through history | Stable | |||
| History based completion | Roadmap | |||
| Connection | Standard flags | Stable | ||
| DSN/URI support | Stable | |||
| Environment variables | Stable | |||
| SSH tunnels | Roadmap | |||
| Security | Keyring integration | Roadmap | ||
| Execution | Multi-statement | Stable | ||
| Explain mode | Roadmap | |||
| Timing display | Stable | |||
| Config | Auto-created config | Stable | ||
| Config format | INI | TOML | Different approach | |
| UI | Status toolbar | Stable |
Legend: Available Planned Deferred Out of scope
Tech Stack Comparison
| Category | dbcli/pgcli | |
|---|---|---|
| Language | Python | Go |
| Postgres Driver | psycopg | jackc/pgx |
| CLI Framework | click | spf13/cobra |
| Interactive Prompt | prompt-toolkit | knz/bubbline |
| Configuration | configobj | spf13/viper |
| SQL Parser | sqlparse | Custom Splitter |
| Tabular Output | tabulate | olekukonko/tablewriter |
| Testing | pytest | stretchr/testify |
Note: The feature comparison above reflects our understanding at the time of writing. As pgcli is an actively maintained project, we recommend checking the official pgcli documentation for the most up-to-date information on its features.