/pam

PAM, the Postgres And MySQL CLI

Primary LanguageGo

PAM, the Postgres And MySQL CLI

pam-logo

PAM is a simple command line tool to access Postgres and MySQL databases.

Features include:

  • Auto-completion
  • Coloration
  • Smart display of wide results
  • History
  • Single binary with no dependencies

demo

Installation

GO111MODULE=on go get -u github.com/Ackar/pam

Configuration

Add your databases to ~/.pam.json with the following format:

{
  "mysqldb": {
    "type": "mysql",
    "dsn": "user:password@tcp(localhost:3306)/my_db"
  },
  "postgresdb": {
    "type": "postgres",
    "dsn": "postgres://user:password@localhost/my_db"
  }
}

You can then use pam DB_NAME to connect to any database.

Contributions welcome!