Categorygithub.com/joshuathompson/psqlconnect
repositorypackage
0.0.0-20211115062557-acf991bd9734
Repository: https://github.com/joshuathompson/psqlconnect.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

psqlconnect

Interface to quickly run a psql command from your ~/.pgpass file

asciicast

Install

Fetch the latest release for your platform from the following page.

How do I add connections?

Connections are handled by a ~/.pgpass file as described by the Postgres docs. Each entry should be in the following format:

# NAME=<your connection name>
hostname:port:database:username:password

The commented line with NAME= is optional but will give you an extra descriptor about the database in psqlconnect. An example pgpass file is included. Make sure that your ~/.pgpass has permissions of 0600.

Security

The .pgpass file stores all information in plain text including usernames and passwords. Arguably this isn't a huge deal because if someone has access to your computer you're compromised but if you need an encrypted file/database you won't get it from this solution.

Keybinds

KeybindDescription
jmove the cursor down a line
kmove the cursor up a line
Enterrun psql with the selected connection
fadd/remove a filter
rrefresh connections from ~/.pgpass
Ctrl+cquit

License

MIT