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

# [NAME](#NAME)

gh-ruleset - View info about repo rulesets

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

Repository rulesets are a way to define a set of rules that apply to a repository. These commands allow you to view information about them.

# [AVAILABLE COMMANDS](#AVAILABLE_COMMANDS)

[**gh-ruleset-check(1)**](#gh_ruleset_check%281%29)

View rules that would apply to a given branch

[**gh-ruleset-list(1)**](#gh_ruleset_list%281%29)

List rulesets for a repository or organization

[**gh-ruleset-view(1)**](#gh_ruleset_view%281%29)

View information about a ruleset

# [OPTIONS](#OPTIONS)

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

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

# [ALIASES](#ALIASES)

gh rs

# [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.

# [EXAMPLE](#EXAMPLE)

```
$ gh ruleset list
$ gh ruleset view --repo OWNER/REPO --web
$ gh ruleset check branch-name
```

# [SEE ALSO](#SEE_ALSO)

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

Oct 2026

---

Document: gh-ruleset(1) from gh 2.103.0-r0 (Chainguard OS)
Source: https://github.com/cli/cli
