pgcli

CLI for Postgres with auto-completion and syntax highlighting

brewmacoslinux
Try with needOr install directly
Source

About

CLI for Postgres with auto-completion and syntax highlighting

Commands

pgcli

Examples

Connect to a local PostgreSQL database$ pgcli -h localhost -U username -d database_name
Connect to a remote PostgreSQL server$ pgcli postgresql://username:password@hostname:5432/database_name
Execute a query and exit$ pgcli -h localhost -U username -d mydb -c 'SELECT * FROM users LIMIT 10;'