Options (5)
booleanList variables for the current repository
Example:
gh variable {{[ls|list]}}-o, --orgbooleanList variables for a specific organization
Example:
gh variable {{[ls|list]}} {{[-o|--org]}} {{organization}}-e, --envbooleanSet a variable for a deployment environment in the current repository
Example:
gh variable set {{name}} {{[-e|--env]}} {{environment_name}}-v, --visibilitybooleanSet an organization variable visible to all repositories
Example:
gh variable set {{name}} {{[-o|--org]}} {{organization}} {{[-v|--visibility]}} all-f, --env-filebooleanSet multiple variables from a dotenv file
Example:
gh variable set {{[-f|--env-file]}} {{path/to/file.env}}Examples (8)
List variables for the current repository
gh variable [ls|list]List variables for a specific organization
gh variable [ls|list] [-o|--org] organizationGet a variable for the current repository
gh variable get nameSet a variable for the current repository (user will be prompted for the value)
gh variable set nameSet a variable for a deployment environment in the current repository
gh variable set name [-e|--env] environment_nameSet an organization variable visible to all repositories
gh variable set name [-o|--org] organization [-v|--visibility] allSet multiple variables from a dotenv file
gh variable set [-f|--env-file] path/to/file.envDelete a variable for the current repository
gh variable delete namemade by @shridhargupta | data from tldr-pages