Skip to content

Getting Started

Ensure you have Go installed (version 1.21+ recommended).

Terminal window
git clone https://github.com/balaji01-4d/pgxcli.git
cd pgxcli
make build

The binary will be created in bin/app.

Connect to a database named mydb as user myuser:

Terminal window
./bin/app mydb myuser
Terminal window
./bin/app --host localhost --port 5432 --user postgres --dbname postgres
Terminal window
./bin/app postgres://user:password@localhost:5432/dbname

Once connected, you can:

  • Execute SQL queries with syntax highlighting
  • Use tab completion for suggestions
  • Access command history with arrow keys
  • Run PostgreSQL special commands (e.g., \d, \l)
  • Check out the CLI reference for all available flags and commands
  • Learn about configuration options and customization