Skip to content

Manage workspace secrets that package secrets bind to.

Terminal window
caplo secret

A workspace secret holds one value for many packages: each package secret bound to it with caplo tool secret bind receives its value. Rotating it with caplo secret set changes the value for every bound package within a minute. Values are never shown again. Names match [a-z][a-z0-9-]{1,63}.

Examples

Terminal window
caplo secret set orders-api-key
caplo secret usage orders-api-key

Commands

Delete a workspace secret that no package secret binds.

Terminal window
caplo secret delete <name> [flags]

Deletes a workspace secret. A secret that package secrets are bound to is not deleted; the command lists the bindings to remove first with caplo tool secret unbind. It asks first; –yes skips the question.

Examples

Terminal window
caplo secret delete orders-api-key --yes

Flags

Flag Value Default Description
--yes, -y do not ask for confirmation

List the workspace secrets and how many package secrets bind each.

Terminal window
caplo secret list [flags]

Examples

Terminal window
caplo secret list

Flags

Flag Value Default Description
--output, -o string table output format: table, json, or yaml

Create a workspace secret or rotate its value, from a hidden prompt or from stdin when it is not a terminal.

Terminal window
caplo secret set <name> [flags]

Creates a workspace secret, or rotates the value of an existing one for every package secret bound to it. The value comes from a hidden prompt, or from standard input without its final newline when that is not a terminal, and is 1 to 8192 bytes. –description sets what it is for; without it, a rotation keeps the current description.

Examples

Terminal window
caplo secret set orders-api-key --description "Orders API key"
printf %s "$ORDERS_API_KEY" | caplo secret set orders-api-key

Flags

Flag Value Default Description
--description string what the secret is for (default: keep the current one)

List the package secrets bound to a workspace secret.

Terminal window
caplo secret usage <name> [flags]

Examples

Terminal window
caplo secret usage orders-api-key

Flags

Flag Value Default Description
--output, -o string table output format: table, json, or yaml