GH-VARIABLE-GET(1)
π gh-variable-get(1) π
okay so bestie, welcome to the gh-variable-get(1) page from the GitHub CLI manual. It's giving βget a variable, know the levelβ energy, and ngl, it's kinda iconic. π¦
β¨ NAME β¨
gh-variable-get β Get variables π
πΈ SYNOPSIS πΈ
gh variable get <variable-name> [flags]
π¦ DESCRIPTION π¦
You're grabbing a variable at one of these levels, bestie:
- repository (the default): available to GitHub Actions runs or Dependabot in a repository
- environment: available to GitHub Actions runs for a deployment environment in a repository
- organization: available to GitHub Actions runs or Dependabot within an organization
No cap, that's the whole level situation. Pick your level with the flags below. Periodt. β¨
π OPTIONS π
Flag by flag, bestie β all the details are here:
-e,--env <string>β get a variable for an environment π±-q,--jq <expression>β filter the JSON output with a jq expression π--json <fields>β output JSON with the fields you specify π§Ύ-o,--org <string>β get a variable for an organization π’-t,--template <string>β format the JSON output with a Go template; seegh help formattingπ
π OPTIONS INHERITED FROM PARENT COMMANDS π
-R,--repo <[HOST/]OWNER/REPO>β select another repository using the[HOST/]OWNER/REPOformat π«Ά
β JSON FIELDS β
These are the JSON fields, literally:
createdAtnamenumSelectedReposselectedReposURLupdatedAtvaluevisibility
π EXIT CODES π
0: Successful execution1: Error2: Command canceled4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
π SEE ALSO π
gh-variable(1)β the related manual page, iykyk π«Ά
that's the whole page, bestie. slay ππ
GitHub CLI v2.102.0 Β· Oct 2026 Β· GH-VARIABLE-GET(1) β bye diva! π
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms