Getting Started
Installation
Pick your operating system or preferred installation method:
- Linux
- Mac
- Windows
- Go Install
- Source Code
Download the package for your distro from the releases page.
Debian / Ubuntu
sudo dpkg -i pgxcli_*_linux_amd64.deb
Fedora / RHEL
sudo rpm -i pgxcli_*_linux_amd64.rpm
Alpine
sudo apk add --allow-untrusted pgxcli_*_linux_amd64.apk
Arch Linux
sudo pacman -U pgxcli_*_linux_amd64.pkg.tar.zst
Archive (tar.gz)
tar -xzf pgxcli_*_linux_amd64.tar.gz
sudo mv pgxcli /usr/local/bin/
Grab the latest .tar.gz for your architecture from the releases page.
Manual Installation
# For Apple Silicon (M1/M2/M3)
tar -xzf pgxcli_0.1.0_darwin_arm64.tar.gz
sudo mv pgxcli /usr/local/bin/
# For Intel Mac
tar -xzf pgxcli_0.1.0_darwin_amd64.tar.gz
sudo mv pgxcli /usr/local/bin/
Installer (MSI) — recommended
Download the .msi from the releases page and run it. pgxcli will be added to your PATH automatically.
Archive (zip)
Grab the .zip from the releases page, extract it, and place pgxcli.exe anywhere on your PATH.
Make sure you have Go 1.21+.
go install github.com/balaji01-4d/pgxcli/cmd/pgxcli@latest
Make sure you have Go 1.21+.
git clone https://github.com/balaji01-4d/pgxcli.git
cd pgxcli
make build
The binary lands in bin/app. Move it wherever you like (e.g., /usr/local/bin/pgxcli).
Quick Start
Connect to a database:
pgxcli mydb myuser
That's it. You'll get a REPL with syntax highlighting, autocompletion, and history — ready to go.
On first run, pgxcli creates a config file at ~/.config/pgxcli/config.toml. You can customize your prompt, theme, pager, and more. See Configuration.
Try a Query
SELECT version();
Results render in a clean table with execution time. If the output is long, pgxcli pages it automatically.
Exit
Type \q.
Next Steps
- Connecting — all the ways to connect (flags, URI, interactive form)
- Configuration — customize your prompt, theme, and behavior
- Special Commands — backslash commands reference
- CLI Flags — every flag, documented