.nh .TH "glab" "1" "Mar 2025" "Auto generated by spf13/cobra" "" .SH NAME glab-variable-set - Create a new variable for a project or group. .SH SYNOPSIS \fBglab variable set [flags]\fP .SH DESCRIPTION Create a new variable for a project or group. .SH OPTIONS \fB-d\fP, \fB--description\fP="" Set description of a variable. .PP \fB-g\fP, \fB--group\fP="" Set variable for a group. .PP \fB-m\fP, \fB--masked\fP[=false] Whether the variable is masked. .PP \fB-p\fP, \fB--protected\fP[=false] Whether the variable is protected. .PP \fB-r\fP, \fB--raw\fP[=false] Whether the variable is treated as a raw string. .PP \fB-s\fP, \fB--scope\fP="\fI" The environment_scope of the variable. Values: all (\fP), or specific environments. .PP \fB-t\fP, \fB--type\fP="env_var" The type of a variable: env_var, file. .PP \fB-v\fP, \fB--value\fP="" The value of a variable. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--help\fP[=false] Show help for this command. .PP \fB-R\fP, \fB--repo\fP="" Select another repository. Can use either \fBOWNER/REPO\fR or \fBGROUP/NAMESPACE/REPO\fR format. Also accepts full URL or Git URL. .SH EXAMPLE .EX 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 .EE .SH SEE ALSO \fBglab-variable(1)\fP