projectsenv
env pull
Write DATABASE_URL template to .env
Write a DATABASE_URL connection string template to a .env file (or a custom
file via --file). The URL points to the project's PgBeam proxy host. You'll
need to replace USER, PASS, and YOUR_DB with your actual upstream database
credentials. If the file already contains a DATABASE_URL, you'll be prompted
before overwriting unless --yes is passed.
Usage
pgbeam env pull [flags]Options
| Option | Description | Required | Default |
|---|---|---|---|
--file <value> | Path to the output file | No | .env |
--yes, -y | Skip the confirmation prompt if the file already contains DATABASE_URL | No | false |
Global options
All global options (--token, --profile,
--project, --org, --json, --no-color, --debug) are also available on
this command.
Examples
# Write DATABASE_URL to .env
pgbeam env pull
# Write to a custom file
pgbeam env pull --file .env.local
# Overwrite existing DATABASE_URL without confirmation
pgbeam env pull --yesOutput
Prints a success message confirming the file was written and reminds you to replace the placeholder credentials (USER, PASS, YOUR_DB).