AgentKit
DocsKitsCLI ReferenceDesktop App
BetaYou are reading docs for the beta channel (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.akv

The group accepts no positional arguments and has no flags of its own.

Workflow

  1. 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 printed age1... recipient.

  2. Seal the secrets the job needs with ak secrets bundle create, naming the same boundary in --profile and the recipient in --encrypt-for. Make the bundle file available to the job.

  3. In the job, run the one program that needs the values:

    ak secrets run --bundle ci-production.akv --profile ci-production -- ./deploy.sh

    The job reads the key from AK_CI_DECRYPT_KEY unless --key-env names another variable, and refuses a bundle made for another profile. See ak secrets run for 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

CommandOutcomeDisk effect
ak secrets bundle keygenCreate a dedicated CI decryption key and print its public recipient.Writes a new 0600 key file.
ak secrets bundle createSeal the selected secrets to a CI recipient.Writes the 0600 bundle file.

Each subcommand writes only the file it is given.

Exit behavior

ExitMeaning
0Success.
1Command failure.
2Invalid flags or arguments.

Each subcommand page lists its own exit codes.