AgentKit
DocsKitsCLI ReferenceDesktop App
BetaYou are reading docs for the beta channel (3.0.0-beta.15). Features may change before the next stable release.Switch to stable →

secrets

ak secrets get

Show a secret's metadata, redacted by default

Use ak secrets get for the operation described below. The command help records its arguments, effects, and options.

Command contract

Show a secret's metadata, redacted by default

Synopsis

Show <ref>'s metadata (creator, created/rotated timestamps). The value itself prints as [redacted] unless --reveal is passed; --reveal requires an interactive terminal on both stdin and stdout and an explicit y/N confirmation, and never applies in --json or piped output. Use it to confirm a ref is stored, or (with --reveal) to check a value during troubleshooting.

Effects: Read-only: reads the index, and (only with --reveal, after confirmation) the backend for the value.

Exit status: 0 success 2 invalid flags or arguments 3 ref has no stored value 5 backend or index failure

ak secrets get <ref> [flags]

Examples

  ak secrets get ${REF}           # metadata only, value shown as [redacted]
  ak secrets get ${REF} --reveal  # interactive confirm, then shows the value

Options

      --backend string         Storage backend: keychain (default), file (age-encrypted vault), or memory (dev/test; values and its index are throwaway)
  -h, --help                   help for get
      --json                   Emit machine-readable JSON (implies --no-interactive)
      --no-interactive         Disable interactive prompts (CI-safe)
  -q, --quiet                  Suppress non-error output on stderr
      --reveal                 Show the actual value after an interactive confirmation
      --unlock-with-recovery   Open the file backend's vault with a recovery private key and set a new passphrase
  -V, --verbose                Extra diagnostic output on stderr (loses to --quiet)
  -y, --yes                    Assume yes for all prompts

SEE ALSO

  • ak secrets - Manage named secret values (API keys, tokens)