Skip to content

vibepg url ​

Synopsis ​

bash
vibepg url <name> [--no-password] [--host <host>]

Description ​

Print a postgres:// connection URL for the instance, with the password from the OS keychain embedded by default. Designed to be safe to use inside $(...) substitution — when stdout is not a TTY, no trailing newline is emitted.

Arguments ​

NameRequiredDescription
nameyesInstance name

Options ​

FlagTypeDefaultDescription
--no-passwordboolfalseOmit the password from the URL
--hoststring127.0.0.1Host to embed in the URL

Examples ​

bash
# Full URL with password
vibepg url demo
# postgres://demo:s0meL0ng@ndR4nd0mPwd@127.0.0.1:5433/demo

# Safe to share / paste in chat
vibepg url demo --no-password
# postgres://demo@127.0.0.1:5433/demo

# Custom hostname (e.g. an SSH tunnel)
vibepg url demo --host db.local

# Use in scripts
export DATABASE_URL=$(vibepg url demo)

Notes ​

  • Password is URL-encoded for you. Special characters won't break the URL.
  • The host defaults to 127.0.0.1 (IPv4) rather than localhost to avoid IPv6 resolution edge cases.
  • TTY detection lets vibepg url work cleanly with both $(...) and direct human use.

See also ​

Released under the MIT License.