Skip to content

list secrets

Terminal window
holocron list secrets [--scope repo|environment|organization] [--env <name>] [--org <name>] [--json]

Prints the names of the secrets at each scope through the secrets capability, sorted, under a heading per scope. GitHub never returns a value, so none is shown. It is read-only: --dry-run does not apply, and it is safe to run anywhere the token exists.

Option Default Description
--scope repo|environment|organization all List one scope. Omitted: the repository, plus the organization and the --env environment.
--env <name> — The environment to list. Required with --scope environment.
--org <name> config The organization to list (global option; falls back to HOLOCRON_ORG, then the config org)
--json false Print [{ "scope": …, "names": […], "error"?: "…" }] instead of the grouped text
repo
HOLOCRON_NOTIFY_DISCORD_ANNOUNCEMENTS
NPM_TOKEN
organization theholocron
HOLOCRON_NOTIFY_ROLE_ID
environment production
✗ 404 Not Found

A scope that cannot be listed (a token without access to it, an environment that does not exist) is shown under its heading and the other scopes are still listed. The exit code is 1 when any scope errored.

Terminal window
# The repository, plus the organization from holocron.config.ts
holocron list secrets
# Only the organization's secrets, as JSON
holocron list secrets --scope organization --org theholocron --json
# One environment
holocron list secrets --scope environment --env production

Uses the same token as new secret: HOLOCRON_SECRETS_TOKEN / github.secrets for the organization scope, HOLOCRON_ADMIN_TOKEN / github.admin for the repository and environment scopes, each falling back to the other. It needs read access to secrets (and to environments for an environment scope).