Skip to main content

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

CategoryFeaturepgcli (Python)pgxcli (Go, v0.3.0)Status
TL;DROverallFeature-rich, matureFast, simple, single-binary-
SQL EditingMulti-line modeStable
External editor (Ctrl+E)Stable
CompletionKeyword completionStable
Schema-aware completionStable v0.3.0
Meta command completionStable v0.3.0
OutputPager supportStable
Table formattingStable
Colored output + themesStable
Syntax highlighting (rich)Stable
CommandsBackslash meta-commandsStable Expanding
Built-in commands (clear)Expanding
HistoryPersistent historyStable
Search through historyStable
History based completionRoadmap
ConnectionStandard flagsStable
DSN/URI supportStable
Environment variablesStable
SSH tunnelsRoadmap
SecurityKeyring integrationRoadmap
ExecutionMulti-statementStable
Explain modeRoadmap
Timing displayStable
ConfigAuto-created configStable
Config formatINITOMLDifferent approach
UIStatus toolbarStable

Legend: Available   Planned   Deferred   Out of scope


Tech Stack Comparison

CategoryPython dbcli/pgcliGo balajz/pgxcli
LanguagePythonGo
Postgres Driverpsycopgjackc/pgx
CLI Frameworkclickspf13/cobra
Interactive Promptprompt-toolkitknz/bubbline
Configurationconfigobjspf13/viper
SQL ParsersqlparseCustom Splitter
Tabular Outputtabulateolekukonko/tablewriter
Testingpyteststretchr/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.