GH-RULESET-VIEW(1)

πŸ’… gh-ruleset-view(1) β€” the GitHub CLI manual, bestie edition πŸŽ€

okay so real talk: this is gh ruleset view, and it's literally the glow-up reveal of your GitHub rulesets. it's part of the GitHub CLI manual and it's giving "let me show you what's actually going on with your rules" ✨


🌸 NAME 🌸

gh-ruleset-view β€” view info about a ruleset πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

gh ruleset view [<ruleset-id>] [flags]

like, you can pass an ID, or you can pass zero IDs and let the vibes (and a prompt) decide. either way we're looking at a ruleset πŸ’–

✨ DESCRIPTION ✨

View information about a GitHub ruleset. that's it, that's the whole thing, and honestly? iconic.

If you don't give it an ID, no worries β€” an interactive prompt pops up and lets you choose the ruleset you wanna view. very "pick your main character" energy 🫢

Now listen, --parents is the flag you're gonna want to know about. it controls whether rulesets configured at higher levels β€” the ones that also apply to the repository or organization you gave it β€” come along for the ride. The default is true. so by default you're getting the whole family tree, not just the immediate child 🌈

πŸŽ€ OPTIONS πŸŽ€

  • -o, --org <string> β€” organization name, for when the ID you handed over is an organization-level ruleset. org girls rise πŸ’…
  • -p, --parents (default true) β€” whether to include rulesets configured at higher levels that also apply. default is true, so yep, they're coming πŸ’–
  • -w, --web β€” open the ruleset in the browser. we love a quick tab moment πŸ¦‹

πŸ’œ OPTIONS INHERITED FROM PARENT COMMANDS πŸ’œ

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format. yes, that format, exactly that one, don't freelance it ✨

πŸ”₯ 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. (iykyk β€” always check the command's own help for the full tea β˜•)

⭐ 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 --no-parents

# 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

look at those examples go. slay after slay πŸ“

🌈 SEE ALSO 🌈

  • gh-ruleset(1) β€” the whole ruleset family, go say hi 🧚

that's the page bestie, no cap, every detail intact πŸ’– keep slaying, and remember: rulesets are your friends, not your enemies πŸ‘‘

signed, sealed, delivered by GitHub CLI v2.102.0 β€” Oct 2026 πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from