GH-SECRET-LIST(1)

πŸ’– GH-SECRET-LIST(1) πŸ’–

okay so bestie, this is the gh-secret-list page from the GitHub CLI manual β€” yes, the real official one, and yes I'm about to make it make sense 🫢

✨ NAME ✨

gh-secret-list β€” literally just list secrets, that's the whole gig πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

gh secret list [flags]

🌸 DESCRIPTION 🌸

so you wanna see your secrets? iconic. here's the thing though β€” secrets live at different levels, and you gotta know which level you're looking at, no cap:

  • repository (this is the default, bestie πŸ”₯): available to GitHub Actions runs, Agents sessions, or Dependabot in a repository
  • environment: available to GitHub Actions runs for a deployment environment in a repository
  • organization: available to GitHub Actions runs, Agents sessions, Dependabot, or Codespaces within an organization
  • user: available to Codespaces for your user

pick your level, pick your vibe, go off πŸ¦‹


🌈 OPTIONS 🌈

  • -a, --app <string> β€” list secrets for one specific application. your choices are {actions|agents|codespaces|dependabot}, choose wisely πŸ’€
  • -e, --env <string> β€” list secrets for an environment
  • -q, --jq <expression> β€” filter the JSON output using a jq expression. yes queen, pipe it through jq, slay ✨
  • --json <fields> β€” output JSON with the specified fields (the full field list is down below, keep scrolling πŸ‘€)
  • -o, --org <string> β€” list secrets for an organization
  • -t, --template <string> β€” format the JSON output using a Go template; see gh help formatting for the deets πŸ“–
  • -u, --user β€” list a secret for your user (just yours, main character energy πŸ‘‘)

πŸ’« OPTIONS INHERITED FROM PARENT COMMANDS πŸ’«

  • -R, --repo [HOST/]OWNER/REPO β€” select another repository using the [HOST/]OWNER/REPO format. note the optional host up front, iykyk 🧚

πŸ¦‹ ALIASES πŸ¦‹

gh secret ls

that's it. ls is the short king. use it, love it πŸ’œ

πŸ’– JSON FIELDS πŸ’–

name, numSelectedRepos, selectedReposURL, updatedAt, visibility

these are the exact field names for --json, character for character, don't @ me 😭

⭐ EXIT CODES ⭐

  • 0: successful execution β€” we ate, no crumbs πŸ“
  • 1: error β€” it's giving oops πŸ™ˆ
  • 2: command canceled β€” you hit Ctrl+C and it respected that
  • 4: authentication required β€” go log in bestie, fr fr πŸ”‘
NOTE: specific commands may have additional exit codes. refer to the command's help for more information πŸ’€

πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole page, you're welcome 😌 this was GitHub CLI v2.102.0, dated Oct 2026 β€” the drama of that date is not lost on me, anyway ily, bye πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from