Manage your PostgreSQL connections locally.
$ make build
Copy ./bin/psqlcm to a path dir.
Because psqlcm encrypts the password before storing it, you must set PSQLCM_KEY prior to running login and show.
NAME:
   psqlcm - psql connection manager
USAGE:
   psqlcm [global options] command [command options] 
COMMANDS:
   new                  New connection
   list, ls             List all available connections
   show                 Show a connection string
   delete, del, remove  Remove a cached connection
   set-current          Set a connection as current
   help, h              Shows a list of commands or help for one command
GLOBAL OPTIONS:
   --help, -h  show help
$ psqlcm new
🖥️  Hostname [localhost]: 127.0.0.1
🌐 Port [5432]: 
📝 Database [postgres]: mydb1
🔨 User [postgres]: myuser1
🔑 Password: 
🔒 SSL mode [require]: disable
📕 Connection name [pg1715219721581]: my-connection1
⚡ Test connection [Y/n]: n
Connection saved!
Note: The password is encrypted and cached locally. The plaintext password is never stored.
$ psqlcm ls
new-connection1
$ psqlcm show new-connection1
postgresql://user1:mysecretpassword@host1:5432/db1
$ psqlcm delete new-connection1
Connection "new-connection1" deleted