Expand description
Update Postgres credentials from Vault, rewrite pgpass & nvim-dbee, optionally launch pgcli.
§Arguments
aliasOptional database alias (interactive selector if missing).
§Usage
vpg # pick alias interactively -> update credentials -> optional connect
vpg reporting # directly update 'reporting' alias then prompt to connect§Flow
- Read ~/.pgpass & parse entries.
- Resolve alias (arg or picker).
- Vault login (if needed) + read secret.
- Update pgpass & nvim dbee conns file.
- Prompt to start pgcli.
§Errors
- External command (
pgcli,vault) fails or exits non-zero. - File read / write operations fail.
- JSON serialization or deserialization fails.
- Required environment variable missing or invalid Unicode.
- User selection or prompt interaction fails.
Modules§
Functions§
- exec_
vault_ 🔒read_ cmd - Executes the
vaultCLI to read a secret as JSON and deserialize it. - main 🔒
- Update Postgres credentials from Vault, rewrite pgpass & nvim-dbee, optionally launch pgcli.