Postgres CLI with autocompletion and syntax highlighting
75
stars
647
commits
Go
primary language
Aug 30, 2026
updated
pgxcli is an interactive PostgreSQL command-line client built in Go, designed for a fast, and smooth REPL experience. It includes syntax highlighting, keyword autocompletion, command history, and support for PostgreSQL backslash commands.
Highlights:
\d, \l, \dt, \q).Pgcli is a mature PostgreSQL CLI developed over many years, which has set the standard for interactive PostgreSQL clients.
For more details, see the Comparison with pgcli.
pgxcli is distributed as a single binary for Linux, macOS, and Windows. You can download the latest version from the releases page.
Download the .deb, .rpm, .apk, or .pkg.tar.zst for your architecture and install it using your package manager.
# Example for Debian / Ubuntu
sudo dpkg -i pgxcli_*_linux_amd64.deb
Download the .tar.gz for your architecture (Intel or Apple Silicon), extract it, and move the binary to your PATH.
tar -xzf pgxcli_*_darwin_arm64.tar.gz
sudo mv pgxcli /usr/local/bin/
Download the .msi or .zip from the releases page. The installer will automatically add pgxcli to your PATH.
You can run pgxcli directly via Docker using the pre-built images:
docker run -it --rm ghcr.io/balajz/pgxcli:v0.3.0 postgres://user:pass@host:5432/db
If you have Go installed, you can install directly:
go install github.com/balajz/pgxcli@latest
For more details, see the Installation Guide.
# positional arguments
pgxcli mydb myuser
# flags
pgxcli --host localhost --port 5432 --user postgres --dbname postgres
# connection URI
pgxcli postgres://user:password@localhost:5432/dbname
# interactive connection form
pgxcli -i
For full flag documentation, see the docs.
On first run, a config file is created at:
$XDG_CONFIG_HOME/pgxcli/config.toml (or the OS-equivalent user config directory)For configuration documentation, see the configuration docs.
We welcome contributions of all kinds — bug reports, feature requests, documentation improvements, and code contributions. Whether you're fixing a typo, reporting an issue, or building a feature, every contribution helps make pgxcli better.
To get started, please read our Contributing Guide for:
Thank you for being part of the community! 🙌
Go
99.0%
Postgres CLI with autocompletion and syntax highlighting
75
stars
647
commits
Go
primary language
Aug 30, 2026
updated
pgxcli is an interactive PostgreSQL command-line client built in Go, designed for a fast, and smooth REPL experience. It includes syntax highlighting, keyword autocompletion, command history, and support for PostgreSQL backslash commands.
Highlights:
\d, \l, \dt, \q).Pgcli is a mature PostgreSQL CLI developed over many years, which has set the standard for interactive PostgreSQL clients.
For more details, see the Comparison with pgcli.
pgxcli is distributed as a single binary for Linux, macOS, and Windows. You can download the latest version from the releases page.
Download the .deb, .rpm, .apk, or .pkg.tar.zst for your architecture and install it using your package manager.
# Example for Debian / Ubuntu
sudo dpkg -i pgxcli_*_linux_amd64.deb
Download the .tar.gz for your architecture (Intel or Apple Silicon), extract it, and move the binary to your PATH.
tar -xzf pgxcli_*_darwin_arm64.tar.gz
sudo mv pgxcli /usr/local/bin/
Download the .msi or .zip from the releases page. The installer will automatically add pgxcli to your PATH.
You can run pgxcli directly via Docker using the pre-built images:
docker run -it --rm ghcr.io/balajz/pgxcli:v0.3.0 postgres://user:pass@host:5432/db
If you have Go installed, you can install directly:
go install github.com/balajz/pgxcli@latest
For more details, see the Installation Guide.
# positional arguments
pgxcli mydb myuser
# flags
pgxcli --host localhost --port 5432 --user postgres --dbname postgres
# connection URI
pgxcli postgres://user:password@localhost:5432/dbname
# interactive connection form
pgxcli -i
For full flag documentation, see the docs.
On first run, a config file is created at:
$XDG_CONFIG_HOME/pgxcli/config.toml (or the OS-equivalent user config directory)For configuration documentation, see the configuration docs.
We welcome contributions of all kinds — bug reports, feature requests, documentation improvements, and code contributions. Whether you're fixing a typo, reporting an issue, or building a feature, every contribution helps make pgxcli better.
To get started, please read our Contributing Guide for:
Thank you for being part of the community! 🙌
Go
99.0%