3.2.0-beta.10). Features may change before the next stable release.Switch to stable →bundle
ak secrets bundle
Seal an explicit allowlist of secrets into an encrypted CI bundle that a protected CI job decrypts with its own dedicated key.
Use ak secrets bundle on your own trusted device to give a protected CI job
the few secrets it needs. You seal the selected values into one file with a
dedicated CI key, and the job decrypts that file locally with
ak secrets run --bundle. The job needs no cloud access and no interactive
step. Running the group command itself prints help.
Usage
ak secrets bundle <command>ak secrets bundle keygen --key-out ./ci-production.key
ak secrets bundle create --profile ci-production --encrypt-for age1... --secret DEPLOY_TOKEN=${REF} --output ci-production.akvThe group accepts no positional arguments and has no flags of its own.
Workflow
-
Create one key per trust boundary, for example production separate from staging, with
ak secrets bundle keygen. Load the key file into the protected CI environment's secret store, then delete the file. Keep the printedage1...recipient. -
Seal the secrets the job needs with
ak secrets bundle create, naming the same boundary in--profileand the recipient in--encrypt-for. Make the bundle file available to the job. -
In the job, run the one program that needs the values:
ak secrets run --bundle ci-production.akv --profile ci-production -- ./deploy.shThe job reads the key from
AK_CI_DECRYPT_KEYunless--key-envnames another variable, and refuses a bundle made for another profile. Seeak secrets runfor bundle mode.
Never reuse the personal vault's passphrase, a recovery key, or a device key as the CI key.
What a bundle is not
A bundle is not cloud sync, and its key is the whole authorization:
- Whoever holds the bundle and its key reads every value in it.
- The CI provider holds the key.
- The runner sees the plaintext while the job runs.
- A copy of a bundle cannot be revoked remotely. To cut off access, rotate the secrets it carries at their provider.
A bundle carries only the variable names and values you selected, never grants, membership, device keys, recovery material, the vault ref names, or other metadata.
Subcommands
| Command | Outcome | Disk effect |
|---|---|---|
ak secrets bundle keygen | Create a dedicated CI decryption key and print its public recipient. | Writes a new 0600 key file. |
ak secrets bundle create | Seal the selected secrets to a CI recipient. | Writes the 0600 bundle file. |
Each subcommand writes only the file it is given.
Exit behavior
| Exit | Meaning |
|---|---|
0 | Success. |
1 | Command failure. |
2 | Invalid flags or arguments. |
Each subcommand page lists its own exit codes.