GitHub CLI gate
46 allow
86 ask
2 block
GitHub CLI. Listing, viewing, searching, and read API are safe. Mutations ask. Two patterns are hard-blocked: deleting a repository (irreversible) and logging out (no way to re-authenticate without user interaction).
Showing all 134 rules.
Blocked
rules/gh.toml#block 2 patternsgh repo delete
Block
Deletes the repository on GitHub. Irreversible: history, issues, PRs, releases, and forks-from-this-repo are removed. Blocked unconditionally.
gh auth logout
Block
Logs out the gh CLI from GitHub. The agent has no way to re-authenticate without user interaction. Blocked unconditionally.
Allowed · read-only
rules/gh.toml#allow 46 patternsgh issue view
Allow
Issue inspection commands.
gh issue list
Allow
Issue inspection commands.
gh issue status
Allow
Issue inspection commands.
gh pr view
Allow
PR inspection commands. Read-only.
gh pr list
Allow
PR inspection commands. Read-only.
gh pr status
Allow
PR inspection commands. Read-only.
gh pr diff
Allow
PR inspection commands. Read-only.
gh pr checks
Allow
Shows CI check status for a pull request. Read-only.
gh pr develop
Allow
Lists linked branches for a pull request when run without flags. Read-only in this form; passing a branch name creates one (gated separately).
gh repo view
Allow
Repo metadata.
gh repo list
Allow
Repo metadata.
gh search issues
Allow
Search endpoints across GitHub. Always GET via the API.
gh search prs
Allow
Search endpoints across GitHub. Always GET via the API.
gh search repos
Allow
Search endpoints across GitHub. Always GET via the API.
gh search commits
Allow
Search endpoints across GitHub. Always GET via the API.
gh search code
Allow
Search endpoints across GitHub. Always GET via the API.
gh status
Allow
Shows a summary of your relevant issues, PRs, and review requests across repos. Read-only.
gh auth status
Allow
Shows the current authentication state, active account, and token scopes. Read-only.
gh auth token
Allow
Prints the stored OAuth token to stdout. Read-only but exposes a credential.
gh config get
Allow
Reads a single gh CLI configuration value. Read-only.
gh config list
Allow
Lists the gh CLI configuration values. Read-only.
gh run list
Allow
Lists recent Actions workflow runs. Read-only.
gh run view
Allow
Shows details, jobs, and logs for an Actions workflow run. Read-only.
gh workflow list
Allow
Lists the Actions workflows defined in the repository. Read-only.
gh workflow view
Allow
Shows an Actions workflow definition and its recent runs. Read-only.
gh release list
Allow
Lists releases for the repository. Read-only.
gh release view
Allow
Shows release notes and asset list for a release. Read-only.
gh gist list
Allow
Lists your gists. Read-only.
gh gist view
Allow
Shows the contents of a gist. Read-only.
gh label list
Allow
Lists labels defined in the repository. Read-only.
gh codespace list
Allow
Lists your codespaces and their state. Read-only.
gh cs list
Allow
Lists your codespaces and their state (
cs alias). Read-only.gh ssh-key list
Allow
Lists the SSH keys registered on the GitHub account. Read-only.
gh gpg-key list
Allow
Lists the GPG keys registered on the GitHub account. Read-only.
gh extension list
Allow
Lists installed gh CLI extensions. Read-only.
gh browse
Allow
Opens the repository, issue, or PR in a browser, or prints the URL with
--no-browser. Does not change anything on GitHub.gh alias list
Allow
Lists the gh CLI command aliases. Read-only.
gh cache list
Allow
Lists Actions caches for the repository. Read-only.
gh variable list
Allow
Lists Actions variable names and values for the repo, environment, or org. Read-only.
gh secret list
Allow
Lists Actions secret names for the repo, environment, or org. Read-only and does not reveal secret values.
gh ruleset list
Allow
Lists repository or organization rulesets. Read-only.
gh ruleset view
Allow
Shows the rules and configuration for a ruleset. Read-only.
gh project list
Allow
Lists Projects for a user or organization. Read-only.
gh project view
Allow
Shows a Project's fields and items. Read-only.
gh run watch
Allow
Streams the status of a workflow run until it finishes. Read-only;
--exit-status only sets the exit code.gh config clear-cache
Allow
Clears gh's local HTTP response cache. Nothing on GitHub changes and the cache refills on the next request.
Asks first · mutations
rules/gh.toml#ask 86 patternsgh repo clone
Ask
Clones a repository into a new directory under the current path. Writes files locally; does not modify the remote.
gh run download
Ask
Downloads workflow run artifacts into the current directory. Writes files locally; does not change anything on GitHub.
gh release download
Ask
Downloads release asset files into the current directory. Writes files locally; does not change the release.
gh gist clone
Ask
Clones a gist into a new local directory. Writes files locally; does not modify the gist.
gh issue create
Ask
Creating issue
gh issue close
Ask
Closing issue
gh issue reopen
Ask
Reopening issue
gh issue edit
Ask
Editing issue
gh issue comment
Ask
Posts a comment to an issue on GitHub. Visible publicly and cannot be silently unsent.
gh issue delete
Ask
Deletes issue
<issue> permanently. Irreversible; comments and reactions go with it. Prefer close for normal workflow.gh issue transfer
Ask
Transferring issue
gh issue pin
Ask
Pinning issue
gh issue unpin
Ask
Unpinning issue
gh issue lock
Ask
Locking issue
gh issue unlock
Ask
Unlocking issue
gh pr create
Ask
Creating PR
gh pr close
Ask
Closing PR
gh pr reopen
Ask
Reopening PR
gh pr edit
Ask
Editing PR
gh pr comment
Ask
Posts a comment to a pull request on GitHub. Visible publicly and cannot be silently unsent.
gh pr merge
Ask
Merges PR
<pr> into the base branch. --squash/--rebase rewrite history; --delete-branch also deletes the source branch.gh pr ready
Ask
Marking PR ready
gh pr review
Ask
Submits a pull request review (approve, request changes, or comment). Posted to GitHub and visible to the author and watchers.
gh pr checkout
Ask
Fetches a pull request branch and checks it out locally. Switches the working tree to the PR's HEAD.
gh repo create
Ask
Creating repository
gh repo rename
Ask
Renaming repository
gh repo edit
Ask
Editing repository
gh repo fork
Ask
Creates a fork of the repository under your account and can add a local remote. Creates a new repo on GitHub.
gh repo archive
Ask
Archives the repository on GitHub. Becomes read-only: no new issues, PRs, comments, or pushes. Reversible via
repo unarchive.gh repo unarchive
Ask
Unarchiving repository
gh repo sync
Ask
Syncing repository
gh repo set-default
Ask
Setting default repo
gh release create
Ask
Publishes a GitHub release. Consumers and package managers may pick it up immediately, and the tag it points at is public from that moment.
gh release delete
Ask
Deletes release
<release> from GitHub. Removes release notes and uploaded assets; the underlying git tag stays unless --cleanup-tag is passed.gh release edit
Ask
Editing release
gh release upload
Ask
Uploads asset files to an existing release. Published assets become downloadable by anyone who can see the release.
gh release delete-asset
Ask
Deleting asset
gh gist create
Ask
Creating gist
gh gist delete
Ask
Deletes gist
<gist> permanently. Irreversible; comments and revision history go with it.gh gist edit
Ask
Editing gist
gh gist rename
Ask
Renaming gist
gh label create
Ask
Creating label
gh label delete
Ask
Deleting label
gh label edit
Ask
Editing label
gh label clone
Ask
Cloning labels
gh workflow run
Ask
Triggers a GitHub Actions workflow run. Executes CI side effects such as deploys and consumes Actions minutes.
gh workflow enable
Ask
Enabling workflow
gh workflow disable
Ask
Disabling workflow
gh run cancel
Ask
Canceling run
gh run rerun
Ask
Rerunning
gh run delete
Ask
Deleting run
gh codespace create
Ask
Creating codespace
gh codespace delete
Ask
Deletes a codespace. Unsaved local changes inside the codespace are lost.
gh codespace edit
Ask
Editing codespace
gh codespace stop
Ask
Stopping codespace
gh codespace rebuild
Ask
Rebuilding codespace
gh cs create
Ask
Creating codespace
gh cs delete
Ask
Deletes a codespace. Unsaved local changes inside the codespace are lost.
gh ssh-key add
Ask
Adding SSH key
gh ssh-key delete
Ask
Removes an SSH key from the GitHub account. SSH access from any machine using that key will stop working.
gh gpg-key add
Ask
Adding GPG key
gh gpg-key delete
Ask
Removes a GPG key from the GitHub account. Existing signed commits stay valid; future signatures with this key will not be marked verified.
gh config set
Ask
Setting config
gh secret set
Ask
Writes an Actions/Codespaces/Dependabot secret. The value cannot be read back afterwards, so a wrong value is only discoverable by a failing workflow.
gh secret delete
Ask
Deletes an Actions/Codespaces/Dependabot secret. Future workflow runs that read this secret will fail until it is recreated.
gh variable set
Ask
Sets an Actions variable for the repo, environment, or organization. Visible to future workflow runs.
gh variable delete
Ask
Deletes an Actions variable. Future workflow runs that read this variable will see it as empty.
gh cache delete
Ask
Deletes one or more GitHub Actions caches. Next workflow run that expects this cache will rebuild it from scratch.
gh extension install
Ask
Installing extension
gh extension upgrade
Ask
Upgrading extension
gh extension remove
Ask
Removing extension
gh alias set
Ask
Setting alias
gh alias delete
Ask
Deleting alias
gh alias import
Ask
Importing aliases
gh project create
Ask
Creating project
gh project delete
Ask
Deleting project
gh project edit
Ask
Editing project
gh project close
Ask
Closing project
gh project copy
Ask
Copying project
gh project item-add
Ask
Adding project item
gh project item-archive
Ask
Archiving item
gh project item-create
Ask
Creating item
gh project item-delete
Ask
Deleting item
gh project item-edit
Ask
Editing item
gh project field-create
Ask
Creating field
gh project field-delete
Ask
Deleting field
Two-pattern block floor. gh repo delete and gh auth logout are the only hard blocks: the first destroys repo history and metadata irreversibly; the second leaves the agent with no way to re-authenticate. Every other mutation asks.