Skip to main content

tuna secrets run

Run a command with injected secrets.

Usage
tuna secrets run -- [COMMAND] [ARGUMENTS] [flags]
FlagDescription
--command stringCommand to execute via shell (e.g. "echo $HOME && env").
-c, --config stringConfiguration name.
--fallback stringPath to the encrypted fallback file (default is derived from the configuration).
--fallback-onlyRead secrets from the fallback file without contacting the API.
--fallback-passphrase stringPassphrase for the fallback file, env TUNA_SECRETS_FALLBACK_PASSPHRASE (default is derived from the API key, project and config).
--fallback-readonlyDisable modifying the fallback file.
--forward-signalsForward signals to the child process (defaults to true when stdout is not a TTY). Default: true.
--mount stringWrite secrets to an ephemeral file (named pipe), accessible at TUNA_SECRETS_MOUNT_PATH; secrets are not injected into the environment.
--mount-format stringMount file format (env, env-no-quotes, json, yaml or docker). Default: env.
--mount-max-reads intMaximum number of times the mounted file can be read (0 for unlimited).
--mount-template stringTemplate file to render into the mount instead of a fixed format.
--name-transformer stringTransform secret names (upper-camel, camel, lower-snake, lower-kebab, tf-var or dotnet-env).
--no-fallbackDisable reading and writing the fallback file.
--offlineAlias for --fallback-only.
--only-secretsPass only secrets to the child process (plus PATH, HOME, PS1, USER, SHELL, TMPDIR).
--preserve-env stringList of secrets, comma-separated, for which the existing environment value takes precedence; "true" preserves all existing values. Default: false.
-p, --project stringProject name.
--scope stringDirectory to scope configuration. Default: ..
--watchAutomatically restart the process when secrets change.

Also accepts the flags of tuna secrets.

Subcommands​

CommandDescription
tuna secrets run cleanDelete old fallback files.

Global flags work too.

History​

0.35.0Added the --command, --fallback, --fallback-only, --fallback-passphrase, --fallback-readonly, --forward-signals, --mount, --mount-format, --mount-max-reads, --mount-template, --name-transformer, --no-fallback, --offline, --only-secrets and --preserve-env flags.
Added the clean command.
0.24.0Command added.