← 返回命令列表

Linux command

doppler-run 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run command with

doppler run -- [node app.js]

Run with specific

doppler run --config [dev] -- [command]

Run with specific

doppler run --project [myapp] -- [command]

Passthrough to shell

doppler run -- sh -c "[echo \$SECRET_KEY]"

Run with fallback

doppler run --fallback [.env.backup] -- [command]

Mount secrets as

doppler run --mount [secrets.env] -- [command]

Transform secret names

doppler run --name-transformer dotnet-env -- [dotnet run]

说明

doppler run executes a command with secrets from Doppler injected as environment variables. This enables applications to access secrets without code changes or local configuration files. Secrets are fetched from the Doppler API and made available only to the executed process. The double-dash separates doppler options from the command to run. Fallback files provide resilience when Doppler is unreachable, while preserve-env prevents overwriting existing environment variables.

参数

-- _COMMAND_
Command to run with injected secrets.
--config _NAME_
Configuration environment to use.
--project _NAME_
Project name.
--fallback _FILE_
Fallback file if Doppler unavailable.
--no-fallback
Disable fallback behavior.
--preserve-env
Preserve existing environment variables. Accepts a comma-separated list of specific secrets (e.g. --preserve-env="FOO,BAR") or "true" for all.
--mount _PATH_
Write secrets to an ephemeral file instead of injecting into the environment. Format auto-detected from file extension.
--mount-format _FORMAT_
File format for mounted secrets (e.g. json, env).
--name-transformer _TRANSFORMER_
Transform secret names from UPPER_SNAKE_CASE (e.g. dotnet-env, tf-var, lower-camel, lower-snake).
--command _CMD_
Command to execute (alternative to using -- separator).
--clean-exit
Exit with a 0 status code when the command is interrupted (SIGINT).
--help
Display help information.

FAQ

What is the doppler-run command used for?

doppler run executes a command with secrets from Doppler injected as environment variables. This enables applications to access secrets without code changes or local configuration files. Secrets are fetched from the Doppler API and made available only to the executed process. The double-dash separates doppler options from the command to run. Fallback files provide resilience when Doppler is unreachable, while preserve-env prevents overwriting existing environment variables.

How do I run a basic doppler-run example?

Run `doppler run -- [node app.js]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -- _COMMAND_ do in doppler-run?

Command to run with injected secrets.