GH-RULESET-LIST(1)

✨ GH-RULESET-LIST πŸ’…

okay so bestie, this is the gh-ruleset-list page from the GitHub CLI manual β€” it's the one that shows you all the rulesets chilling on a repo or an org πŸ‘‘ (the man page header calls it GH-RULESET-LIST(1), very official, very demure).

🌸 NAME 🌸

gh-ruleset-list β€” list rulesets for a repository or organization, periodt ✨

πŸŽ€ SYNOPSIS πŸŽ€

gh ruleset list [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

So you wanna see the GitHub rulesets for a repository or an organization? Say less, bestie, that's literally the whole job πŸ’–

If you don't pass any options at all, it lists the rulesets of the current repository β€” like, wherever you're standing right now. Want to peek at a different repo's rulesets instead? Use the --repo flag, easy. And if your heart desires organization-wide rulesets, hit the --org flag and it'll list the rulesets configured for the org you hand it 🫢

Now here's the cute part: the --parents flag controls whether rulesets configured at higher levels β€” the ones that also apply to the repo or org you passed β€” get returned too. The default is true, so yes, you're getting the whole family tree by default 🌈

⚠️ okay heads up, this one's important: your access token must have the admin:org scope to use the --org flag. You can grant it by running gh auth refresh -s admin:org πŸ”₯

πŸ’… OPTIONS πŸ’…

  • -L, --limit <int> (default 30) β€” maximum number of rulesets to list, capisce? πŸ“
  • -o, --org <string> β€” list the organization-wide rulesets for the organization you provide
  • -p, --parents (default true) β€” whether to include rulesets configured at higher levels that also apply
  • -w, --web β€” open the list of rulesets in the web browser, for when you'd rather vibe with the UI πŸ¦‹

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format (yes, keep that format exactly, it's iconic)

⭐ ALIASES ⭐

gh rs ls, gh ruleset ls β€” short and sweet, iykyk πŸ’«

πŸ”₯ 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 β€” don't come for me, come for the help text.

🌸 EXAMPLE 🌸

# List rulesets in the current repository
$ gh ruleset list

# List rulesets in a different repository, including those configured at higher levels
$ gh ruleset list --repo owner/repo --parents

# List rulesets in an organization
$ gh ruleset list --org org-name

🧚 SEE ALSO 🧚

gh-ruleset(1) β€” go say hi to the parent, bestie 🫢


and that's the whole page, no cap ✨ this was GitHub CLI v2.102.0, dated Oct 2026, and honestly? she ate. mwah πŸ’‹

πŸ“¦ where this page comes from