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
| Name | Required | Description |
|---|---|---|
name | yes | Instance name |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--no-password | bool | false | Omit the password from the URL |
--host | string | 127.0.0.1 | Host 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 thanlocalhostto avoid IPv6 resolution edge cases. - TTY detection lets
vibepg urlwork cleanly with both$(...)and direct human use.