---
title: Blossom CLI Environment Defaults
url: "/docs/blossom-cli/environment-defaults/"
canonical_url: https://docs.blossom88.com/docs/blossom-cli/environment-defaults/
markdown_url: https://docs.blossom88.com/docs/blossom-cli/environment-defaults.md
summary: Use environment variables as defaults for Blossom CLI flags
categories:
- cli
- environment
---

# Blossom CLI Environment Defaults

Environment variables can provide defaults for Blossom CLI flags. This is useful
when you are running several commands against the same resource.

For example, instead of passing `--id` each time:

    blossom environment:show --id environment-100

set the matching environment variable once:

    export BLOSSOM_ENVIRONMENT_SHOW_ID=environment-100
    blossom environment:show

## Naming

Use this pattern:

```text
BLOSSOM_<COMMAND>_<FLAG>
```

Blossom uppercases the command and flag names. Colons and dashes become
underscores.

Examples:

    export BLOSSOM_ENVIRONMENT_SHOW_ID=environment-100
    blossom environment:show

    export BLOSSOM_PROFILE_USE_NAME=production
    blossom profile:use

    export BLOSSOM_APP_SHOW_ID=app-100
    blossom app:show

Use the full command name. A default for `environment:show` is different from a
default for `app:show`.

## Explicit Flags Win

If you pass a flag directly, Blossom uses the flag value:

    export BLOSSOM_ENVIRONMENT_SHOW_ID=environment-100
    blossom environment:show --id environment-200

That command shows `environment-200`.

## Boolean Flags

Boolean values must be `true` or `false`:

    export BLOSSOM_LOGS_FOLLOW=true
    blossom logs --environment environment-100

Command-specific defaults can also opt out of command defaults. For example,
`activity:logs` shows timestamps by default because timing is usually part of
the activity timeline:

    export BLOSSOM_ACTIVITY_LOGS_TIMESTAMPS=false
    blossom activity:logs --id activity-100

For one command, use the named flag:

    blossom activity:logs --id activity-100 --timestamps=false

Or use the boolean negation form:

    blossom activity:logs --id activity-100 --no-timestamps

## Global Settings

Some environment variables are global settings rather than command flag
defaults.

| Variable | Purpose |
| --- | --- |
| `BLOSSOM_API_URL` | Use a specific Blossom API endpoint. |
| `BLOSSOM_TOKEN` | Use an API token without saved login credentials. |
| `BLOSSOM_ACCOUNT` | Assert the token’s Account; does not switch Accounts. |
| `BLOSSOM_PROFILE` | Select a saved local CLI profile for one command. |
| `BLOSSOM_OUTPUT` | Select output mode: `text` or `json`. |
| `BLOSSOM_PAGE_SIZE` | Set the page size used by list commands. |
| `BLOSSOM_LOG_LEVEL` | Enable CLI diagnostic logs: `silent`, `info`, `debug`, or `trace`. |
| `BLOSSOM_PAGER` | Select the pager used for long interactive text output. Set it to an empty value to disable paging. You can also pipe to `cat`, such as `blossom activity:list \| cat`. |
| `BLOSSOM_TIMEZONE` | Format CLI log timestamps in a specific timezone, such as `America/Los_Angeles`. |
| `BLOSSOM_TIME_FORMAT` | Format CLI log timestamps with `12h` or `24h` time. |

Use command-specific defaults for repeated flags. Use global settings for
account, output, login, and diagnostic behavior.

From the terminal, run `blossom help:env_vars` for the same environment-variable
model.
