GH-VARIABLE(1) GitHub CLI manual GH-VARIABLE(1)

# [NAME](#NAME)

gh-variable - Manage GitHub Actions variables

# [SYNOPSIS](#SYNOPSIS)

**gh variable &lt;command&gt; \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Variables can be set at the repository, environment or organization level for use in GitHub Actions or Dependabot. Run **gh help variable set** to learn how to get started.

# [AVAILABLE COMMANDS](#AVAILABLE_COMMANDS)

[**gh-variable-delete(1)**](#gh_variable_delete%281%29)

Delete variables

[**gh-variable-get(1)**](#gh_variable_get%281%29)

Get variables

[**gh-variable-list(1)**](#gh_variable_list%281%29)

List variables

[**gh-variable-set(1)**](#gh_variable_set%281%29)

Create or update variables

# [OPTIONS](#OPTIONS)

[**-R**, **--repo** **&lt;\[HOST/\]OWNER/REPO&gt;**](#R)

Select another repository using the \[HOST/]OWNER/REPO format

# [EXIT CODES](#EXIT_CODES)

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

# [SEE ALSO](#SEE_ALSO)

[**gh(1)**](/man/os/gh/gh.1)

Oct 2026

---

Document: gh-variable(1) from gh 2.103.3-r1 (Chainguard OS)
Source: https://github.com/cli/cli
