---
name: "glab-variable-export"
section: "1"
platform: "linux"
package: "glab"
version: "1.126.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/glab-variable-export"
---

# glab-variable-export(1)

Export variables from a project or group.

## NAME

glab-variable-export - Export variables from a project or group.

## SYNOPSIS

**glab variable export \[flags\]**

## DESCRIPTION

Defaults to the current project. Use **--group** to export variables for a group. Use **--output** to set the format: **json** (default), **env** (KEY=VALUE pairs), or **export** (shell export statements).

## OPTIONS

**-g**, **--group**=""\
 	Select a group or subgroup. Ignored if a repository argument is set.

**--jq**=""\
 	Filter JSON output with a jq expression.

**-F**, **--output**="json"\
 	Format output as: json, export, env.

**-p**, **--page**=1\
 	Page number.

**-P**, **--per-page**=100\
 	Number of items to list per page.

**-R**, **--repo**=""\
 	Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.

**-s**, **--scope**="*"*\
 	*The environment\_scope of the variables. Values: '*' (default), or specific environments.

## OPTIONS INHERITED FROM PARENT COMMANDS

**-h**, **--help**\[=false\]\
 	Show help for this command.

## EXAMPLE

```
glab variable export
glab variable export --per-page 1000 --page 1
glab variable export --group gitlab-org
glab variable export --group gitlab-org --per-page 1000 --page 1
glab variable export --output json
glab variable export --output env
glab variable export --output export
```

## SEE ALSO

**[glab-variable(1)](/glab-variable/1.md)**
