.nh .TH "glab" "1" "Jul 2026" "Auto generated by spf13/cobra" "" .SH NAME glab-variable-import - Import variables from a JSON file or standard input. .SH SYNOPSIS \fBglab variable import [flags]\fP .SH DESCRIPTION The inverse of \fBglab variable export\fR\&. Reads a JSON array of variable objects, in the same shape \fBexport --output json\fR emits. .PP The command: .IP \(bu 2 Reads from standard input, or from a file with \fB--input-file\fR\&. .IP \(bu 2 Imports into the current project by default. Use \fB--group\fR to import into a group instead. .IP \(bu 2 Stops with an error if a variable already exists. Pass \fB--skip-existing\fR to skip those and continue. .PP Hidden variables' values aren't included in \fBexport\fR output, so re-importing one is skipped with a warning. Set its value again with \fBglab variable set --hidden\fR\&. .SH OPTIONS \fB-g\fP, \fB--group\fP="" Select a group or subgroup. Ignored if a repository argument is set. .PP \fB-i\fP, \fB--input-file\fP="" Read the variables JSON from this file instead of standard input. .PP \fB-R\fP, \fB--repo\fP="" Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. .PP \fB--skip-existing\fP[=false] Skip variables that already exist instead of failing. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB-h\fP, \fB--help\fP[=false] Show help for this command. .SH EXAMPLE .EX # Pipe an export straight into an import, to restore the same project glab variable export | glab variable import # Import variables from a saved file instead of standard input glab variable import --input-file variables.json # Import into a group instead of the current project glab variable export --group gitlab-org | glab variable import --group gitlab-org # Skip variables that already exist instead of failing glab variable import --input-file variables.json --skip-existing .EE .SH SEE ALSO \fBglab-variable(1)\fP