pgcli

Pgcli is a command line interface for Postgres with auto-completion and syntax highlighting.

Screenshot

Quick Start

If you already know how to install python packages, then you can simply do:

$ pip install pgcli

If you're on OS X you can install it via homebrew. Just be aware that this will install postgresql via homebrew if you don't already have it.

$ brew install pgcli

If you're having trouble with the quick start, check the install page for detailed instructions.

Usage

$ pgcli --help
Usage: pgcli [OPTIONS] [DATABASE] [USERNAME]

Options:
  -h, --host TEXT     Host address of the postgres database.
  -p, --port INTEGER  Port number at which the postgres instance is listening.
  -U, --user TEXT     User name to connect to the postgres database.
  -W, --password      Force password prompt.
  -w, --no-password   Never prompt for password.
  -v, --version       Version of pgcli.
  -d, --dbname TEXT   database name to connect to.
  --pgclirc TEXT      Location of pgclirc file.
  --help              Show this message and exit.

Examples

$ pgcli local_database

$ pgcli postgres://amjith:passw0rd@example.com:5432/app_db

$ pgcli -h localhost -p 5432 -U amjith app_db

Request

If you know how to debian package or RPM pacakge for Python applications please get in touch.

blogroll

social