glab-variable-get(1)
| glab(1) | glab(1) |
NAME
glab-variable-get - Get a variable for a project or group.
SYNOPSIS
glab variable get [flags]
DESCRIPTION
Prints the value of a single variable by key. Use --scope to select a variable in a specific environment, or --group to read a group variable instead.
By default the command reads one level only. Pass --inherited to fall back to the groups above the project and then to the instance, in the order CI resolves a variable: the project first, then each parent group closest first, then instance variables.
A level that does not define the key, or that you cannot read, is skipped. Instance variables apply to every environment, so --scope does not filter them.
OPTIONS
-g, --group="" Get variable for a group.
--inherited[=false] If the key is not defined at the selected level, look in the groups above it, then in instance variables.
--jq="" Filter JSON output with a jq expression.
-F, --output="text" Format output as: text, json.
-s, --scope="" The environment_scope of the variable. Values: all (), or specific environments.
OPTIONS INHERITED FROM PARENT COMMANDS
-h, --help[=false] Show help for this command.
-R, --repo="" Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
EXAMPLE
glab variable get VAR_KEY glab variable get -g GROUP VAR_KEY glab variable get -s SCOPE VAR_KEY # Read the project, then its parent groups, then the instance glab variable get --inherited VAR_KEY
SEE ALSO
glab-variable(1)
| Oct 2026 | Auto generated by spf13/cobra |
