glab(1)

πŸ¦‹ glab(1) β€” the glab manual, bestie πŸ¦‹

✨ NAME ✨

glab-variable-set β€” create a new variable for a project or group. that’s the whole mission, and it’s literally that simple: new variable, project or group, slay. πŸ’…

🌸 SYNOPSIS 🌸

glab variable set   [flags]

πŸ’– DESCRIPTION πŸ’–

okay so you can pass the variable value from standard input β€” yes, stdin is your bestie, no cap. use --group to set a variable for a group instead of the current project. 🫢

πŸŽ€ OPTIONS πŸŽ€

  • -d, --description="" β€” set the description of a variable. cute little label energy. ✨
  • -g, --group="" β€” set the variable for a group. group chat, but make it variables. πŸ’…
  • --hidden[=false] β€” whether the variable is hidden. sneaky little icon. πŸ™ˆ
  • -m, --masked[=false] β€” whether the variable is masked. keep it lowkey. 🫣
  • -p, --protected[=false] β€” whether the variable is protected. main character boundary setting. πŸ‘‘
  • -r, --raw[=false] β€” whether the variable is treated as a raw string. no extra processing vibes. 🧚
  • -s, --scope="" β€” the environment_scope of the variable. Values: all (), or specific environments. pick your lane. 🌈
  • -t, --type="env_var" β€” the type of a variable: env_var, file. that’s the menu, bestie. πŸ“
  • -v, --value="" β€” the value of a variable. the actual contents, the moment, the lore. πŸ’–

🧬 OPTIONS INHERITED FROM PARENT COMMANDS 🧬

  • -h, --help[=false] β€” show help for this command. when you need the manual to manual. 😭
  • -R, --repo="" β€” select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. flexible icon. πŸ”₯

🌈 EXAMPLE 🌈

these are the exact moves, bestie β€” copy them character for character if you need to. ✨

glab variable set WITH_ARG "some value"
glab variable set WITH_DESC "some value" --description "some description"
glab variable set FROM_FLAG -v "some value"
glab variable set FROM_ENV_WITH_ARG "${ENV_VAR}"
glab variable set FROM_ENV_WITH_FLAG -v"${ENV_VAR}"
glab variable set FROM_FILE < secret.txt
cat file.txt | glab variable set SERVER_TOKEN
cat token.txt | glab variable set GROUP_TOKEN -g mygroup --scope=prod

πŸ‘‘ SEE ALSO πŸ‘‘

glab-variable(1) β€” go read that one too, bestie. 🌸


okay bye bestie! 🫢 this page was Auto generated by spf13/cobra β€” that’s the source/version note β€” dated Nov 2026, and it belongs to the glab(1) manual. periodt. πŸ’…

πŸ“¦ where this page comes from