glab(1)
π glab-variable-update β the glow-up your CI variables deserve
okay bestie, so this is a page from the glab manual β yes, the GitLab CLI one β and it's all about the glab variable update command. Buckle up, we're updating an existing variable for a project or a group. No new variables here, only glow-ups. π
β¨ NAME β¨
glab-variable-update β literally just: update an existing variable for a project or group. That's the whole vibe. π
πΈ SYNOPSIS πΈ
glab variable update [flags]
that's it, that's the shape of it. flags go brrr. π¦
π« DESCRIPTION π«
okay so first thing β you can pipe the variable value in from standard input. very < secret.txt of you, we love that. π«Ά
and if you wanna update a variable for a group instead of the current project, pass --group. easy.
heads up bestie: the --scope flag does not apply to group variables. like, at all. not its lane. π
also super important, and honestly kind of iconic: only the attributes you actually pass get changed. everything else stays exactly where it is. so --protected, --masked, --raw, --type and --description all keep their current values unless you specifically set them. no surprise glow-downs here. β¨
and if you wanna turn one of those boolean attributes off? say it with your chest: --protected=false. that's the move. π
π₯ OPTIONS π₯
-d,--description=""β sets the description of a variable. give it a little lore. π-g,--group=""β sets the variable for a group. group chat energy, not project chat energy.-m,--masked[=false]β whether the variable is masked. π-p,--protected[=false]β whether the variable is protected. keep it safe, keep it iconic. π‘οΈ-r,--raw[=false]β whether the variable is treated as a raw string. no processing, just vibes.-s,--scope=""β the environment_scope of the variable. values:all(which is the default, empty), or specific environments. (remember: doesn't apply to group variables, bestie π«₯)-t,--type="env_var"β the type of a variable:env_var,file. pick your fighter. β-v,--value=""β the value of a variable. the actual content. the main character. π
π OPTIONS INHERITED FROM PARENT COMMANDS π
these come from the parent command, they're like the family heirlooms:
-h,--help[=false]β shows help for this command. when in doubt, ask for help. π-R,--repo=""β selects another repository. you can use eitherOWNER/REPOorGROUP/NAMESPACE/REPO. the full URL or Git URL is also accepted. so many options, all valid. β¨
π¦ EXAMPLE π¦
okay here's the part where it gets good. live footage of the command in action:
glab variable update WITH_ARG "some value"
glab variable update FROM_FLAG -v "some value"
glab variable update FROM_ENV_WITH_ARG "${ENV_VAR}"
glab variable update FROM_ENV_WITH_FLAG -v"${ENV_VAR}"
glab variable update FROM_FILE < secret.txt
cat file.txt | glab variable update SERVER_TOKEN
cat token.txt | glab variable update GROUP_TOKEN -g mygroup
look at all those ways to feed a value in β arg, flag, env var, env var in a flag, stdin redirect, pipe, pipe into a group variable. genuinely obsessed. ππ
β SEE ALSO β
glab-variable(1)β the whole variable family, go say hi. π
and that's the page, bestie! π this little beauty was auto generated by spf13/cobra, dated Nov 2026, and it lives in the glab(1) manual. periodt. πβ¨
π¦ where this page comes from
- arch rolling: glab 1.128.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms