pgcli

  • pgcli
  • Install
  • Docs
  • FAQ
  • Develop
  • Thanks
  • About
  • Archives

Integrating pgcli with heroku toolbelt

Wed 06 May 2015
By Amjith

In Blog.

tags: pythonheroku

Heroku is a popular PAAS provider that offers managed Postgres database. Heroku provides a convenience command to connect to the postgres database, which will launch psql. Now it is possible to launch pgcli instead of the default psql for heroku Postgres by installing the heroku-pg-pgcli plugin for heroku tool belt.

Installation

Make sure pgcli is installed. If it is not installed check the installation instructions. Typically it is:

Either:

    $ brew install pgcli    # Only on OS X

or

    $ pip install pgcli   # Python package installation

Then install the heroku plugin

    $ heroku plugins:install git@github.com:chrisanderton/heroku-pg-pgcli.git

Usage

Run this from within a Heroku app directory

    $ heroku pg:pgcli

That will launch pgcli with the appropriate database credentials, taken from heroku DATABASE_URL for that application.

That's it.

Credit

Thanks to Chris Anderton for creating this heroku plugin.

Categories

  • Blog

Blogroll

  • mycli

Social

  • atom feed
  • twitter
  • github
Proudly powered by pelican, which takes great advantages of python.

The theme is «notmyidea-cms», a modified version of «notmyidea», the default theme.