bk secret create accepts file or stdin values
Introduced 2026-08-26 · score 0.98
HOW TO USE IT
When automation needs a multiline secret value, use `--value-file <path>` or pipe the value to `bk secret create` with `--value-file -`. For stdin, include `--no-input`; do not combine `--value` and `--value-file`.
bk secret create --cluster-uuid <cluster-uuid> --key <key> --value-file <path>printf 'line one\nline two\n' | bk secret create --no-input --cluster-uuid <cluster-uuid> --key <key> --value-file -WHY THIS HELPS
Create a secret with a multiline value in automation without placing the value inline in shell history.
BEFORE THIS CHANGE
The value was supplied inline or entered interactively.
REQUIREMENTS AND LIMITATIONS
- Version: v3.55.1
- --cluster-uuid <cluster-uuid> (required): UUID of the cluster.
- --key <key> (required): Secret key name.
- --value-file <path>: Read the secret value from a file; use `-` for stdin. Content is preserved exactly. Mutually exclusive with `--value` per the release note.
- --no-input: Used with `--value-file -` in the documented stdin example; the reference does not list its behavior among the command flags.
- --value <value>: Provide the secret value inline; if neither value source is provided, the command prompts for it. Mutually exclusive with `--value-file` per the release note.
- `--value` and `--value-file` are mutually exclusive.
- File and stdin content is preserved exactly, including trailing LF or CRLF.
- Empty and invalid UTF-8 file or stdin values are rejected.
- Inline and interactive behavior is preserved.
FIRST-PARTY EVIDENCE
- https://github.com/buildkite/cli/releases/tag/v3.55.1
- https://github.com/buildkite/cli/pull/960
- https://buildkite.com/docs/platform/cli/reference/secret
Check the installed version and the source before using it. Entry JSON