blossom env_var:pull
Write an Environment's variables to a .env file
Write an Environment’s variables to a .env file
Usage
blossom env_var:pull --environment ENVIRONMENT [--reveal] [--file FILE] [--force]
Flags
| Flag | Description |
|---|---|
--environment, -e (required) |
Environment id to pull from |
--reveal |
Read actual values (requires env_var:read permission) |
--file |
Dotenv file to write. Default: .env. |
--force, -f |
Overwrite an existing file |
Examples:
blossom env_var:pull --environment environment-100
blossom env_var:pull --environment environment-100 --reveal
blossom env_var:pull --environment environment-100 --reveal --file .env.production --force
Writes variable names to .env.<environment name> by default. This names-only
file contains commented keys and a # blossom:names-only marker. env_var:push
rejects it, including with --prune, so it cannot replace real configuration.
Add --reveal to export actual values. This requires both environment:read
and env_var:read in your membership and token permissions. Full access includes
both; general Read only does not include value retrieval. A denied reveal
leaves the destination unchanged.
The command refuses to overwrite an existing file without --force, writes
it readable by you only, and refuses a path that git tracks. Terminal and JSON
output name keys only, even when --reveal writes values to the file.
The file groups variables into a # blossom:build block followed by a
# blossom:runtime block, with keys alphabetized within each block. Empty
blocks are omitted. Revealed exports preserve Build settings for a later
env_var:push. Build variables are also available at runtime.