.nh .TH "GH-RULESET-LIST" "1" "Mar 2024" "" "GitHub CLI manual" .SH NAME .PP gh-ruleset-list - List rulesets for a repository or organization .SH SYNOPSIS .PP \fBgh ruleset list [flags]\fR .SH DESCRIPTION .PP List GitHub rulesets for a repository or organization. .PP If no options are provided, the current repository's rulesets are listed. You can query a different repository's rulesets by using the \fB--repo\fR flag. You can also use the \fB--org\fR flag to list rulesets configured for the provided organization. .PP Use the \fB--parents\fR flag to control whether rulesets configured at higher levels that also apply to the provided repository or organization should be returned. The default is \fBtrue\fR\&. .PP Your access token must have the \fBadmin:org\fR scope to use the \fB--org\fR flag, which can be granted by running \fBgh auth refresh -s admin:org\fR\&. .SH OPTIONS .TP \fB-L\fR, \fB--limit\fR \fB (default 30)\fR Maximum number of rulesets to list .TP \fB-o\fR, \fB--org\fR \fB\fR List organization-wide rulesets for the provided organization .TP \fB-p\fR, \fB--parents\fR \fB(default true)\fR Whether to include rulesets configured at higher levels that also apply .TP \fB-w\fR, \fB--web\fR Open the list of rulesets in the web browser .SH OPTIONS INHERITED FROM PARENT COMMANDS .TP \fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR Select another repository using the [HOST/]OWNER/REPO format .SH EXAMPLE .EX # 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 .EE .SH SEE ALSO .PP \fBgh-ruleset(1)\fR