---
name: "gh-ruleset"
section: "1"
platform: "linux"
package: "github-cli"
version: "2.102.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gh-ruleset"
---

# gh-ruleset(1)

View info about repo rulesets

## NAME

gh-ruleset - View info about repo rulesets

## SYNOPSIS

**gh ruleset \<command\> \[flags\]**

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

- **[gh-ruleset-check(1)](/gh-ruleset-check/1.md)**

  View rules that would apply to a given branch

- **[gh-ruleset-list(1)](/gh-ruleset-list/1.md)**

  List rulesets for a repository or organization

- **[gh-ruleset-view(1)](/gh-ruleset-view/1.md)**

  View information about a ruleset

## OPTIONS

- **-R**, **--repo** **\<\[HOST/\]OWNER/REPO\>**

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

## ALIASES

gh rs

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

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

## SEE ALSO

**[gh(1)](/gh/1.md)**
