secrets
ak secrets get
Xem metadata của một bí mật; giá trị được che theo mặc định.
Xem metadata của một bí mật; giá trị được che theo mặc định.
Dùng ak secrets get với đối số và tùy chọn dưới đây. Phần help nguyên bản giữ nguyên thuật ngữ, cú pháp, tác động và điều kiện thực thi của CLI để đối chiếu chính xác.
Contract và help của lệnh
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 valueOptions
--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 promptsSEE ALSO
- ak secrets - Manage named secret values (API keys, tokens)