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

# [NAME](#NAME)

gh-ruleset-view - View information about a ruleset

# [SYNOPSIS](#SYNOPSIS)

**gh ruleset view \[&lt;ruleset-id&gt;] \[flags]**

# [DESCRIPTION](#DESCRIPTION)

View information about a GitHub ruleset.

If no ID is provided, an interactive prompt will be used to choose the ruleset to view.

Use the **--parents** flag to control whether rulesets configured at higher levels that also apply to the provided repository or organization should be returned. The default is **true**.

# [OPTIONS](#OPTIONS)

[**-o**, **--org** **&lt;string&gt;**](#o)

Organization name if the provided ID is an organization-level ruleset

[**-p**, **--parents** **(default true)**](#p)

Whether to include rulesets configured at higher levels that also apply

[**-w**, **--web**](#w)

Open the ruleset in the browser

# [OPTIONS INHERITED FROM PARENT COMMANDS](#OPTIONS_INHERITED_FROM_PARENT_COMMANDS)

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

# [EXAMPLE](#EXAMPLE)

```
# Interactively choose a ruleset to view from all rulesets that apply to the current repository
$ gh ruleset view
# Interactively choose a ruleset to view from only rulesets configured in the current repository
$ gh ruleset view --parents=false
# View a ruleset configured in the current repository or any of its parents
$ gh ruleset view 43
# View a ruleset configured in a different repository or any of its parents
$ gh ruleset view 23 --repo owner/repo
# View an organization-level ruleset
$ gh ruleset view 23 --org my-org
```

# [SEE ALSO](#SEE_ALSO)

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

Oct 2026

---

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