Skip to main content
These commands manage environment variables on a project environment. They default to prod. Use --env staging or --env preview (with --branch) for the other environments. There is no dev target: local trigger dev reads your local .env.

env list

Lists user-set environment variables. TRIGGER_ system variables are omitted. Values are hidden unless you pass --show-values.
--show-values
Print the actual values, including secrets.

env get

Prints one variable. --raw prints only the value, with no banner or extra text, so you can capture it in a script.
<name>
The name of the environment variable.
--raw
Print only the value.

env set

Creates the variable if it does not exist, and overwrites the value if it does. Empty or whitespace-only values are rejected. Updating an existing secret without --secret changes the value and leaves it secret. Pass --secret when you first create a secret, or when you want a non-secret variable to become one.
<name>
The name of the environment variable.
<value>
The value to set. Cannot be empty.
--secret
Store the value as a secret, so it cannot be read back.

env pull

Writes the project’s environment variables to a local file. Defaults to .env.local. Fails if the file already exists unless you pass --force.
-o, --output <file>
The file to write. Defaults to .env.local.
--force
Overwrite the output file if it exists.

Options

--env | -e
The environment to use: prod, staging or preview. Defaults to prod.
--config | -c
The name of the config file found at the project path. Defaults to trigger.config.ts
--project-ref | -p
The project ref. Required if there is no config file.
--branch | -b
When using --env preview the branch is automatically detected from git. But you can manually specify it by using this option, e.g. --branch my-branch or -b my-branch.

Common options

These options are available on most commands.
--profile
The login profile to use. Defaults to “default”.
--api-url | -a
Override the default API URL. If not specified, it uses https://api.trigger.dev. This can also be set via the TRIGGER_API_URL environment variable.
--log-level | -l
The CLI log level to use. Options are debug, info, log, warn, error, and none. This does not affect the log level of your trigger.dev tasks. Defaults to log.
--skip-telemetry
Opt-out of sending telemetry data. This can also be done via the TRIGGER_TELEMETRY_DISABLED environment variable. Just set it to anything other than an empty string.
--help | -h
Shows the help information for the command.
--version | -v
Displays the version number of the CLI.