Skip to content

Instantly share code, notes, and snippets.

@dpritchett
Created March 18, 2026 16:37
Show Gist options
  • Select an option

  • Save dpritchett/4caa0699090e2fb1548602682a7d71cf to your computer and use it in GitHub Desktop.

Select an option

Save dpritchett/4caa0699090e2fb1548602682a7d71cf to your computer and use it in GitHub Desktop.
gh help-all: cobra help-all proof of concept applied to GitHub CLI
$ gh help-all --help
List all commands with their arguments and descriptions
Usage:
help-all [flags]
Flags:
-h, --help help for help-all
-v, --verbose Include all flags for each command
$ gh help-all
gh agent-task <command> # Work with agent tasks (preview)
gh agent-task create [<task description>] [flags] # Create an agent task (preview)
gh agent-task list # List agent tasks (preview)
gh agent-task view [<session-id> | <pr-number> | <pr-url> | <pr-branch>] # View an agent task session (preview)
gh alias delete {<alias> | --all} # Delete set aliases
gh alias import [<filename> | -] # Import aliases from a YAML file
gh alias list # List your aliases
gh alias set <alias> <expansion> # Create a shortcut for a gh command
gh api <endpoint> # Make an authenticated GitHub API request
gh attestation download [<file-path> | oci://<image-uri>] [--owner | --repo] # Download an artifact's attestations for offline use
gh attestation trusted-root [--tuf-url <url> --tuf-root <file-path>] [--verify-only] # Output trusted_root.jsonl contents, likely for offline verification
gh attestation verify [<file-path> | oci://<image-uri>] [--owner | --repo] # Verify an artifact's integrity using attestations
gh auth login # Log in to a GitHub account
gh auth logout # Log out of a GitHub account
gh auth refresh # Refresh stored authentication credentials
gh auth setup-git # Setup git with GitHub CLI
gh auth status # Display active account and authentication state on each known GitHub host
gh auth switch # Switch active GitHub account
gh auth token # Print the authentication token gh uses for a hostname and account
gh browse [<number> | <path> | <commit-sha>] # Open repositories, issues, pull requests, and more in the browser
gh cache delete [<cache-id> | <cache-key> | --all] # Delete GitHub Actions caches
gh cache list # List GitHub Actions caches
gh codespace code # Open a codespace in Visual Studio Code
gh codespace cp [-e] [-r] [-- [<scp flags>...]] <sources>... <dest> # Copy files between local and remote file systems
gh codespace create # Create a codespace
gh codespace delete # Delete codespaces
gh codespace edit # Edit a codespace
gh codespace jupyter # Open a codespace in JupyterLab
gh codespace list # List codespaces
gh codespace logs # Access codespace logs
gh codespace ports # List ports in a codespace
gh codespace ports forward <remote-port>:<local-port>... # Forward ports
gh codespace ports visibility <port>:{public|private|org}... # Change the visibility of the forwarded port
gh codespace rebuild # Rebuild a codespace
gh codespace ssh [<flags>...] [-- <ssh-flags>...] [<command>] # SSH into a codespace
gh codespace stop # Stop a running codespace
gh codespace view # View details about a codespace
gh completion -s <shell> # Generate shell completion scripts
gh config clear-cache # Clear the cli cache
gh config get <key> # Print the value of a given configuration key
gh config list # Print a list of configuration keys and values
gh config set <key> <value> # Update configuration with a value for the given key
gh copilot [flags] [args] # Run the GitHub Copilot CLI (preview)
gh extension browse # Enter a UI for browsing, adding, and removing extensions
gh extension create [<name>] # Create a new extension
gh extension exec <name> [args] # Execute an installed extension
gh extension install <repository> # Install a gh extension from a repository
gh extension list # List installed extension commands
gh extension remove <name> # Remove an installed extension
gh extension search [<query>] # Search extensions to the GitHub CLI
gh extension upgrade {<name> | --all} # Upgrade installed extensions
gh gist clone <gist> [<directory>] [-- <gitflags>...] # Clone a gist locally
gh gist create [<filename>... | <pattern>... | -] # Create a new gist
gh gist delete {<id> | <url>} # Delete a gist
gh gist edit {<id> | <url>} [<filename>] # Edit one of your gists
gh gist list # List your gists
gh gist rename {<id> | <url>} <old-filename> <new-filename> # Rename a file in a gist
gh gist view [<id> | <url>] # View a gist
gh gpg-key add [<key-file>] # Add a GPG key to your GitHub account
gh gpg-key delete <key-id> # Delete a GPG key from your GitHub account
gh gpg-key list # Lists GPG keys in your GitHub account
gh help [command] # Help about any command
gh issue close {<number> | <url>} # Close issue
gh issue comment {<number> | <url>} # Add a comment to an issue
gh issue create # Create a new issue
gh issue delete {<number> | <url>} # Delete issue
gh issue develop {<number> | <url>} # Manage linked branches for an issue
gh issue edit {<numbers> | <urls>} # Edit issues
gh issue list # List issues in a repository
gh issue lock {<number> | <url>} # Lock issue conversation
gh issue pin {<number> | <url>} # Pin a issue
gh issue reopen {<number> | <url>} # Reopen issue
gh issue status # Show status of relevant issues
gh issue transfer {<number> | <url>} <destination-repo> # Transfer issue to another repository
gh issue unlock {<number> | <url>} # Unlock issue conversation
gh issue unpin {<number> | <url>} # Unpin a issue
gh issue view {<number> | <url>} # View an issue
gh label clone <source-repository> # Clones labels from one repository to another
gh label create <name> # Create a new label
gh label delete <name> # Delete a label from a repository
gh label edit <name> # Edit a label
gh label list # List labels in a repository
gh licenses # View third-party license information
gh org list # List organizations for the authenticated user.
gh pr checkout [<number> | <url> | <branch>] # Check out a pull request in git
gh pr checks [<number> | <url> | <branch>] # Show CI status for a single pull request
gh pr close {<number> | <url> | <branch>} # Close a pull request
gh pr comment [<number> | <url> | <branch>] # Add a comment to a pull request
gh pr create # Create a pull request
gh pr diff [<number> | <url> | <branch>] # View changes in a pull request
gh pr edit [<number> | <url> | <branch>] # Edit a pull request
gh pr list # List pull requests in a repository
gh pr lock {<number> | <url>} # Lock pull request conversation
gh pr merge [<number> | <url> | <branch>] # Merge a pull request
gh pr ready [<number> | <url> | <branch>] # Mark a pull request as ready for review
gh pr reopen {<number> | <url> | <branch>} # Reopen a pull request
gh pr revert {<number> | <url> | <branch>} # Revert a pull request
gh pr review [<number> | <url> | <branch>] # Add a review to a pull request
gh pr status # Show status of relevant pull requests
gh pr unlock {<number> | <url>} # Unlock pull request conversation
gh pr update-branch [<number> | <url> | <branch>] # Update a pull request branch
gh pr view [<number> | <url> | <branch>] # View a pull request
gh preview prompter [prompt type] # Execute a test program to preview the prompter
gh project close [<number>] # Close a project
gh project copy [<number>] # Copy a project
gh project create # Create a project
gh project delete [<number>] # Delete a project
gh project edit [<number>] # Edit a project
gh project field-create [<number>] # Create a field in a project
gh project field-delete # Delete a field in a project
gh project field-list [<number>] # List the fields in a project
gh project item-add [<number>] # Add a pull request or an issue to a project
gh project item-archive [<number>] # Archive an item in a project
gh project item-create [<number>] # Create a draft issue item in a project
gh project item-delete [<number>] # Delete an item from a project by ID
gh project item-edit # Edit an item in a project
gh project item-list [<number>] # List the items in a project
gh project link [<number>] # Link a project to a repository or a team
gh project list # List the projects for an owner
gh project mark-template [<number>] # Mark a project as a template
gh project unlink [<number>] # Unlink a project from a repository or a team
gh project view [<number>] # View a project
gh release create [<tag>] [<filename>... | <pattern>...] # Create a new release
gh release delete <tag> # Delete a release
gh release delete-asset <tag> <asset-name> # Delete an asset from a release
gh release download [<tag>] # Download release assets
gh release edit <tag> # Edit a release
gh release list # List releases in a repository
gh release upload <tag> <files>... # Upload assets to a release
gh release verify [<tag>] # Verify the attestation for a release
gh release verify-asset [<tag>] <file-path> # Verify that a given asset originated from a release
gh release view [<tag>] # View information about a release
gh repo archive [<repository>] # Archive a repository
gh repo autolink create <keyPrefix> <urlTemplate> # Create a new autolink reference
gh repo autolink delete <id> # Delete an autolink reference
gh repo autolink list # List autolink references for a GitHub repository
gh repo autolink view <id> # View an autolink reference
gh repo clone <repository> [<directory>] [-- <gitflags>...] # Clone a repository locally
gh repo create [<name>] # Create a new repository
gh repo delete [<repository>] # Delete a repository
gh repo deploy-key add <key-file> # Add a deploy key to a GitHub repository
gh repo deploy-key delete <key-id> # Delete a deploy key from a GitHub repository
gh repo deploy-key list # List deploy keys in a GitHub repository
gh repo edit [<repository>] # Edit repository settings
gh repo fork [<repository>] [-- <gitflags>...] # Create a fork of a repository
gh repo gitignore list # List available repository gitignore templates
gh repo gitignore view <template> # View an available repository gitignore template
gh repo license list # List common repository licenses
gh repo license view {<license-key> | <spdx-id>} # View a specific repository license
gh repo list [<owner>] # List repositories owned by user or organization
gh repo rename [<new-name>] # Rename a repository
gh repo set-default [<repository>] # Configure default repository for this directory
gh repo sync [<destination-repository>] # Sync a repository
gh repo unarchive [<repository>] # Unarchive a repository
gh repo view [<repository>] # View a repository
gh ruleset check [<branch>] # View rules that would apply to a given branch
gh ruleset list # List rulesets for a repository or organization
gh ruleset view [<ruleset-id>] # View information about a ruleset
gh run cancel [<run-id>] # Cancel a workflow run
gh run delete [<run-id>] # Delete a workflow run
gh run download [<run-id>] # Download artifacts generated by a workflow run
gh run list # List recent workflow runs
gh run rerun [<run-id>] # Rerun a run
gh run view [<run-id>] # View a summary of a workflow run
gh run watch <run-id> # Watch a run until it completes, showing its progress
gh search code <query> # Search within code
gh search commits [<query>] # Search for commits
gh search issues [<query>] # Search for issues
gh search prs [<query>] # Search for pull requests
gh search repos [<query>] # Search for repositories
gh secret delete <secret-name> # Delete secrets
gh secret list # List secrets
gh secret set <secret-name> # Create or update secrets
gh ssh-key add [<key-file>] # Add an SSH key to your GitHub account
gh ssh-key delete <id> # Delete an SSH key from your GitHub account
gh ssh-key list # Lists SSH keys in your GitHub account
gh status # Print information about relevant issues, pull requests, and notifications across repositories
gh variable delete <variable-name> # Delete variables
gh variable get <variable-name> # Get variables
gh variable list # List variables
gh variable set <variable-name> # Create or update variables
gh workflow disable [<workflow-id> | <workflow-name>] # Disable a workflow
gh workflow enable [<workflow-id> | <workflow-name>] # Enable a workflow
gh workflow list # List workflows
gh workflow run [<workflow-id> | <workflow-name>] # Run a workflow by creating a workflow_dispatch event
gh workflow view [<workflow-id> | <workflow-name> | <filename>] # View the summary of a workflow
$ gh help-all --verbose
gh agent-task <command> # Work with agent tasks (preview)
gh agent-task create [<task description>] [flags] [--base BASE] [--custom-agent CUSTOM-AGENT] [--follow] [--from-file FROM-FILE] [--repo REPO] # Create an agent task (preview)
gh agent-task list [--jq JQ] [--json JSON] [--limit N] [--template TEMPLATE] [--web] # List agent tasks (preview)
gh agent-task view [<session-id> | <pr-number> | <pr-url> | <pr-branch>] [--follow] [--jq JQ] [--json JSON] [--log] [--repo REPO] [--template TEMPLATE] [--web] # View an agent task session (preview)
gh alias delete {<alias> | --all} [--all] # Delete set aliases
gh alias import [<filename> | -] [--clobber] # Import aliases from a YAML file
gh alias list # List your aliases
gh alias set <alias> <expansion> [--clobber] [--shell] # Create a shortcut for a gh command
gh api <endpoint> [--cache DURATION] [--field FIELD] [--header HEADER] [--hostname HOSTNAME] [--include] [--input INPUT] [--jq JQ] [--method METHOD] [--paginate] [--preview PREVIEW] [--raw-field RAW-FIELD] [--silent] [--slurp] [--template TEMPLATE] [--verbose] # Make an authenticated GitHub API request
gh attestation download [<file-path> | oci://<image-uri>] [--owner | --repo] [--digest-alg DIGEST-ALG] [--hostname HOSTNAME] [--limit N] [--owner OWNER] [--predicate-type PREDICATE-TYPE] [--repo REPO] # Download an artifact's attestations for offline use
gh attestation trusted-root [--tuf-url <url> --tuf-root <file-path>] [--verify-only] [--hostname HOSTNAME] [--tuf-root TUF-ROOT] [--tuf-url TUF-URL] [--verify-only] # Output trusted_root.jsonl contents, likely for offline verification
gh attestation verify [<file-path> | oci://<image-uri>] [--owner | --repo] [--bundle BUNDLE] [--bundle-from-oci] [--cert-identity CERT-IDENTITY] [--cert-identity-regex CERT-IDENTITY-REGEX] [--cert-oidc-issuer CERT-OIDC-ISSUER] [--custom-trusted-root CUSTOM-TRUSTED-ROOT] [--deny-self-hosted-runners] [--digest-alg DIGEST-ALG] [--format FORMAT] [--hostname HOSTNAME] [--jq JQ] [--limit N] [--no-public-good] [--owner OWNER] [--predicate-type PREDICATE-TYPE] [--repo REPO] [--signer-digest SIGNER-DIGEST] [--signer-repo SIGNER-REPO] [--signer-workflow SIGNER-WORKFLOW] [--source-digest SOURCE-DIGEST] [--source-ref SOURCE-REF] [--template TEMPLATE] # Verify an artifact's integrity using attestations
gh auth login [--clipboard] [--git-protocol GIT-PROTOCOL] [--hostname HOSTNAME] [--insecure-storage] [--scopes SCOPES] [--skip-ssh-key] [--web] [--with-token] # Log in to a GitHub account
gh auth logout [--hostname HOSTNAME] [--user USER] # Log out of a GitHub account
gh auth refresh [--clipboard] [--hostname HOSTNAME] [--insecure-storage] [--remove-scopes REMOVE-SCOPES] [--reset-scopes] [--scopes SCOPES] # Refresh stored authentication credentials
gh auth setup-git [--force] [--hostname HOSTNAME] # Setup git with GitHub CLI
gh auth status [--active] [--hostname HOSTNAME] [--jq JQ] [--json JSON] [--show-token] [--template TEMPLATE] # Display active account and authentication state on each known GitHub host
gh auth switch [--hostname HOSTNAME] [--user USER] # Switch active GitHub account
gh auth token [--hostname HOSTNAME] [--user USER] # Print the authentication token gh uses for a hostname and account
gh browse [<number> | <path> | <commit-sha>] [--actions] [--blame] [--branch BRANCH] [--commit COMMIT] [--no-browser] [--projects] [--releases] [--repo REPO] [--settings] [--wiki] # Open repositories, issues, pull requests, and more in the browser
gh cache delete [<cache-id> | <cache-key> | --all] [--all] [--ref REF] [--succeed-on-no-caches] # Delete GitHub Actions caches
gh cache list [--jq JQ] [--json JSON] [--key KEY] [--limit N] [--order ORDER] [--ref REF] [--sort SORT] [--template TEMPLATE] # List GitHub Actions caches
gh codespace code [--codespace CODESPACE] [--insiders] [--repo REPO] [--repo-owner REPO-OWNER] [--web] # Open a codespace in Visual Studio Code
gh codespace cp [-e] [-r] [-- [<scp flags>...]] <sources>... <dest> [--codespace CODESPACE] [--expand] [--profile PROFILE] [--recursive] [--repo REPO] [--repo-owner REPO-OWNER] # Copy files between local and remote file systems
gh codespace create [--branch BRANCH] [--default-permissions] [--devcontainer-path DEVCONTAINER-PATH] [--display-name DISPLAY-NAME] [--idle-timeout DURATION] [--location LOCATION] [--machine MACHINE] [--repo REPO] [--retention-period DURATION] [--status] [--web] # Create a codespace
gh codespace delete [--all] [--codespace CODESPACE] [--days DAYS] [--force] [--org ORG] [--repo REPO] [--repo-owner REPO-OWNER] [--user USER] # Delete codespaces
gh codespace edit [--codespace CODESPACE] [--display-name DISPLAY-NAME] [--machine MACHINE] [--repo REPO] [--repo-owner REPO-OWNER] # Edit a codespace
gh codespace jupyter [--codespace CODESPACE] [--repo REPO] [--repo-owner REPO-OWNER] # Open a codespace in JupyterLab
gh codespace list [--jq JQ] [--json JSON] [--limit N] [--org ORG] [--repo REPO] [--template TEMPLATE] [--user USER] [--web] # List codespaces
gh codespace logs [--codespace CODESPACE] [--follow] [--repo REPO] [--repo-owner REPO-OWNER] # Access codespace logs
gh codespace ports [--codespace CODESPACE] [--jq JQ] [--json JSON] [--repo REPO] [--repo-owner REPO-OWNER] [--template TEMPLATE] # List ports in a codespace
gh codespace ports forward <remote-port>:<local-port>... # Forward ports
gh codespace ports visibility <port>:{public|private|org}... # Change the visibility of the forwarded port
gh codespace rebuild [--codespace CODESPACE] [--full] [--repo REPO] [--repo-owner REPO-OWNER] # Rebuild a codespace
gh codespace ssh [<flags>...] [-- <ssh-flags>...] [<command>] [--codespace CODESPACE] [--config] [--debug] [--debug-file DEBUG-FILE] [--profile PROFILE] [--repo REPO] [--repo-owner REPO-OWNER] [--server-port N] # SSH into a codespace
gh codespace stop [--codespace CODESPACE] [--org ORG] [--repo REPO] [--repo-owner REPO-OWNER] [--user USER] # Stop a running codespace
gh codespace view [--codespace CODESPACE] [--jq JQ] [--json JSON] [--repo REPO] [--repo-owner REPO-OWNER] [--template TEMPLATE] # View details about a codespace
gh completion -s <shell> [--shell SHELL] # Generate shell completion scripts
gh config clear-cache # Clear the cli cache
gh config get <key> [--host HOST] # Print the value of a given configuration key
gh config list [--host HOST] # Print a list of configuration keys and values
gh config set <key> <value> [--host HOST] # Update configuration with a value for the given key
gh copilot [flags] [args] [--remove] # Run the GitHub Copilot CLI (preview)
gh extension browse [--debug] [--single-column] # Enter a UI for browsing, adding, and removing extensions
gh extension create [<name>] [--precompiled PRECOMPILED] # Create a new extension
gh extension exec <name> [args] # Execute an installed extension
gh extension install <repository> [--force] [--pin PIN] # Install a gh extension from a repository
gh extension list # List installed extension commands
gh extension remove <name> # Remove an installed extension
gh extension search [<query>] [--jq JQ] [--json JSON] [--license LICENSE] [--limit N] [--order ORDER] [--owner OWNER] [--sort SORT] [--template TEMPLATE] [--web] # Search extensions to the GitHub CLI
gh extension upgrade {<name> | --all} [--all] [--dry-run] [--force] # Upgrade installed extensions
gh gist clone <gist> [<directory>] [-- <gitflags>...] # Clone a gist locally
gh gist create [<filename>... | <pattern>... | -] [--desc DESC] [--filename FILENAME] [--public] [--web] # Create a new gist
gh gist delete {<id> | <url>} [--yes] # Delete a gist
gh gist edit {<id> | <url>} [<filename>] [--add ADD] [--desc DESC] [--filename FILENAME] [--remove REMOVE] # Edit one of your gists
gh gist list [--filter FILTER] [--include-content] [--limit N] [--public] [--secret] # List your gists
gh gist rename {<id> | <url>} <old-filename> <new-filename> # Rename a file in a gist
gh gist view [<id> | <url>] [--filename FILENAME] [--files] [--raw] [--web] # View a gist
gh gpg-key add [<key-file>] [--title TITLE] # Add a GPG key to your GitHub account
gh gpg-key delete <key-id> [--yes] # Delete a GPG key from your GitHub account
gh gpg-key list # Lists GPG keys in your GitHub account
gh help [command] # Help about any command
gh issue close {<number> | <url>} [--comment COMMENT] [--duplicate-of DUPLICATE-OF] [--reason REASON] # Close issue
gh issue comment {<number> | <url>} [--body BODY] [--body-file BODY-FILE] [--create-if-none] [--delete-last] [--edit-last] [--editor] [--web] [--yes] # Add a comment to an issue
gh issue create [--assignee ASSIGNEE] [--body BODY] [--body-file BODY-FILE] [--editor] [--label LABEL] [--milestone MILESTONE] [--project PROJECT] [--recover RECOVER] [--template TEMPLATE] [--title TITLE] [--web] # Create a new issue
gh issue delete {<number> | <url>} [--yes] # Delete issue
gh issue develop {<number> | <url>} [--base BASE] [--branch-repo BRANCH-REPO] [--checkout] [--list] [--name NAME] # Manage linked branches for an issue
gh issue edit {<numbers> | <urls>} [--add-assignee ADD-ASSIGNEE] [--add-label ADD-LABEL] [--add-project ADD-PROJECT] [--body BODY] [--body-file BODY-FILE] [--milestone MILESTONE] [--remove-assignee REMOVE-ASSIGNEE] [--remove-label REMOVE-LABEL] [--remove-milestone] [--remove-project REMOVE-PROJECT] [--title TITLE] # Edit issues
gh issue list [--app APP] [--assignee ASSIGNEE] [--author AUTHOR] [--jq JQ] [--json JSON] [--label LABEL] [--limit N] [--mention MENTION] [--milestone MILESTONE] [--search SEARCH] [--state STATE] [--template TEMPLATE] [--web] # List issues in a repository
gh issue lock {<number> | <url>} [--reason REASON] # Lock issue conversation
gh issue pin {<number> | <url>} # Pin a issue
gh issue reopen {<number> | <url>} [--comment COMMENT] # Reopen issue
gh issue status [--jq JQ] [--json JSON] [--template TEMPLATE] # Show status of relevant issues
gh issue transfer {<number> | <url>} <destination-repo> # Transfer issue to another repository
gh issue unlock {<number> | <url>} # Unlock issue conversation
gh issue unpin {<number> | <url>} # Unpin a issue
gh issue view {<number> | <url>} [--comments] [--jq JQ] [--json JSON] [--template TEMPLATE] [--web] # View an issue
gh label clone <source-repository> [--force] # Clones labels from one repository to another
gh label create <name> [--color COLOR] [--description DESCRIPTION] [--force] # Create a new label
gh label delete <name> [--yes] # Delete a label from a repository
gh label edit <name> [--color COLOR] [--description DESCRIPTION] [--name NAME] # Edit a label
gh label list [--jq JQ] [--json JSON] [--limit N] [--order ORDER] [--search SEARCH] [--sort SORT] [--template TEMPLATE] [--web] # List labels in a repository
gh licenses # View third-party license information
gh org list [--limit N] # List organizations for the authenticated user.
gh pr checkout [<number> | <url> | <branch>] [--branch BRANCH] [--detach] [--force] [--recurse-submodules] # Check out a pull request in git
gh pr checks [<number> | <url> | <branch>] [--fail-fast] [--interval N] [--jq JQ] [--json JSON] [--required] [--template TEMPLATE] [--watch] [--web] # Show CI status for a single pull request
gh pr close {<number> | <url> | <branch>} [--comment COMMENT] [--delete-branch] # Close a pull request
gh pr comment [<number> | <url> | <branch>] [--body BODY] [--body-file BODY-FILE] [--create-if-none] [--delete-last] [--edit-last] [--editor] [--web] [--yes] # Add a comment to a pull request
gh pr create [--assignee ASSIGNEE] [--base BASE] [--body BODY] [--body-file BODY-FILE] [--draft] [--dry-run] [--editor] [--fill] [--fill-first] [--fill-verbose] [--head HEAD] [--label LABEL] [--milestone MILESTONE] [--no-maintainer-edit] [--project PROJECT] [--recover RECOVER] [--reviewer REVIEWER] [--template TEMPLATE] [--title TITLE] [--web] # Create a pull request
gh pr diff [<number> | <url> | <branch>] [--color COLOR] [--exclude EXCLUDE] [--name-only] [--patch] [--web] # View changes in a pull request
gh pr edit [<number> | <url> | <branch>] [--add-assignee ADD-ASSIGNEE] [--add-label ADD-LABEL] [--add-project ADD-PROJECT] [--add-reviewer ADD-REVIEWER] [--base BASE] [--body BODY] [--body-file BODY-FILE] [--milestone MILESTONE] [--remove-assignee REMOVE-ASSIGNEE] [--remove-label REMOVE-LABEL] [--remove-milestone] [--remove-project REMOVE-PROJECT] [--remove-reviewer REMOVE-REVIEWER] [--title TITLE] # Edit a pull request
gh pr list [--app APP] [--assignee ASSIGNEE] [--author AUTHOR] [--base BASE] [--draft] [--head HEAD] [--jq JQ] [--json JSON] [--label LABEL] [--limit N] [--search SEARCH] [--state STATE] [--template TEMPLATE] [--web] # List pull requests in a repository
gh pr lock {<number> | <url>} [--reason REASON] # Lock pull request conversation
gh pr merge [<number> | <url> | <branch>] [--admin] [--author-email AUTHOR-EMAIL] [--auto] [--body BODY] [--body-file BODY-FILE] [--delete-branch] [--disable-auto] [--match-head-commit MATCH-HEAD-COMMIT] [--merge] [--rebase] [--squash] [--subject SUBJECT] # Merge a pull request
gh pr ready [<number> | <url> | <branch>] [--undo] # Mark a pull request as ready for review
gh pr reopen {<number> | <url> | <branch>} [--comment COMMENT] # Reopen a pull request
gh pr revert {<number> | <url> | <branch>} [--body BODY] [--body-file BODY-FILE] [--draft] [--title TITLE] # Revert a pull request
gh pr review [<number> | <url> | <branch>] [--approve] [--body BODY] [--body-file BODY-FILE] [--comment] [--request-changes] # Add a review to a pull request
gh pr status [--conflict-status] [--jq JQ] [--json JSON] [--template TEMPLATE] # Show status of relevant pull requests
gh pr unlock {<number> | <url>} # Unlock pull request conversation
gh pr update-branch [<number> | <url> | <branch>] [--rebase] # Update a pull request branch
gh pr view [<number> | <url> | <branch>] [--comments] [--jq JQ] [--json JSON] [--template TEMPLATE] [--web] # View a pull request
gh preview prompter [prompt type] # Execute a test program to preview the prompter
gh project close [<number>] [--format FORMAT] [--jq JQ] [--owner OWNER] [--template TEMPLATE] [--undo] # Close a project
gh project copy [<number>] [--drafts] [--format FORMAT] [--jq JQ] [--source-owner SOURCE-OWNER] [--target-owner TARGET-OWNER] [--template TEMPLATE] [--title TITLE] # Copy a project
gh project create [--format FORMAT] [--jq JQ] [--owner OWNER] [--template TEMPLATE] [--title TITLE] # Create a project
gh project delete [<number>] [--format FORMAT] [--jq JQ] [--owner OWNER] [--template TEMPLATE] # Delete a project
gh project edit [<number>] [--description DESCRIPTION] [--format FORMAT] [--jq JQ] [--owner OWNER] [--readme README] [--template TEMPLATE] [--title TITLE] [--visibility VISIBILITY] # Edit a project
gh project field-create [<number>] [--data-type DATA-TYPE] [--format FORMAT] [--jq JQ] [--name NAME] [--owner OWNER] [--single-select-options SINGLE-SELECT-OPTIONS] [--template TEMPLATE] # Create a field in a project
gh project field-delete [--format FORMAT] [--id ID] [--jq JQ] [--template TEMPLATE] # Delete a field in a project
gh project field-list [<number>] [--format FORMAT] [--jq JQ] [--limit N] [--owner OWNER] [--template TEMPLATE] # List the fields in a project
gh project item-add [<number>] [--format FORMAT] [--jq JQ] [--owner OWNER] [--template TEMPLATE] [--url URL] # Add a pull request or an issue to a project
gh project item-archive [<number>] [--format FORMAT] [--id ID] [--jq JQ] [--owner OWNER] [--template TEMPLATE] [--undo] # Archive an item in a project
gh project item-create [<number>] [--body BODY] [--format FORMAT] [--jq JQ] [--owner OWNER] [--template TEMPLATE] [--title TITLE] # Create a draft issue item in a project
gh project item-delete [<number>] [--format FORMAT] [--id ID] [--jq JQ] [--owner OWNER] [--template TEMPLATE] # Delete an item from a project by ID
gh project item-edit [--body BODY] [--clear] [--date DATE] [--field-id FIELD-ID] [--format FORMAT] [--id ID] [--iteration-id ITERATION-ID] [--jq JQ] [--number NUMBER] [--project-id PROJECT-ID] [--single-select-option-id SINGLE-SELECT-OPTION-ID] [--template TEMPLATE] [--text TEXT] [--title TITLE] # Edit an item in a project
gh project item-list [<number>] [--format FORMAT] [--jq JQ] [--limit N] [--owner OWNER] [--query QUERY] [--template TEMPLATE] # List the items in a project
gh project link [<number>] [--owner OWNER] [--repo REPO] [--team TEAM] # Link a project to a repository or a team
gh project list [--closed] [--format FORMAT] [--jq JQ] [--limit N] [--owner OWNER] [--template TEMPLATE] [--web] # List the projects for an owner
gh project mark-template [<number>] [--format FORMAT] [--jq JQ] [--owner OWNER] [--template TEMPLATE] [--undo] # Mark a project as a template
gh project unlink [<number>] [--owner OWNER] [--repo REPO] [--team TEAM] # Unlink a project from a repository or a team
gh project view [<number>] [--format FORMAT] [--jq JQ] [--owner OWNER] [--template TEMPLATE] [--web] # View a project
gh release create [<tag>] [<filename>... | <pattern>...] [--discussion-category DISCUSSION-CATEGORY] [--draft] [--fail-on-no-commits] [--generate-notes] [--latest] [--notes NOTES] [--notes-file NOTES-FILE] [--notes-from-tag] [--notes-start-tag NOTES-START-TAG] [--prerelease] [--target TARGET] [--title TITLE] [--verify-tag] # Create a new release
gh release delete <tag> [--cleanup-tag] [--yes] # Delete a release
gh release delete-asset <tag> <asset-name> [--yes] # Delete an asset from a release
gh release download [<tag>] [--archive ARCHIVE] [--clobber] [--dir DIR] [--output OUTPUT] [--pattern PATTERN] [--skip-existing] # Download release assets
gh release edit <tag> [--discussion-category DISCUSSION-CATEGORY] [--draft] [--latest] [--notes NOTES] [--notes-file NOTES-FILE] [--prerelease] [--tag TAG] [--target TARGET] [--title TITLE] [--verify-tag] # Edit a release
gh release list [--exclude-drafts] [--exclude-pre-releases] [--jq JQ] [--json JSON] [--limit N] [--order ORDER] [--template TEMPLATE] # List releases in a repository
gh release upload <tag> <files>... [--clobber] # Upload assets to a release
gh release verify [<tag>] [--format FORMAT] [--jq JQ] [--template TEMPLATE] # Verify the attestation for a release
gh release verify-asset [<tag>] <file-path> [--format FORMAT] [--jq JQ] [--template TEMPLATE] # Verify that a given asset originated from a release
gh release view [<tag>] [--jq JQ] [--json JSON] [--template TEMPLATE] [--web] # View information about a release
gh repo archive [<repository>] [--yes] # Archive a repository
gh repo autolink create <keyPrefix> <urlTemplate> [--numeric] # Create a new autolink reference
gh repo autolink delete <id> [--yes] # Delete an autolink reference
gh repo autolink list [--jq JQ] [--json JSON] [--template TEMPLATE] [--web] # List autolink references for a GitHub repository
gh repo autolink view <id> [--jq JQ] [--json JSON] [--template TEMPLATE] # View an autolink reference
gh repo clone <repository> [<directory>] [-- <gitflags>...] [--no-upstream] [--upstream-remote-name UPSTREAM-REMOTE-NAME] # Clone a repository locally
gh repo create [<name>] [--add-readme] [--clone] [--description DESCRIPTION] [--disable-issues] [--disable-wiki] [--gitignore GITIGNORE] [--homepage HOMEPAGE] [--include-all-branches] [--internal] [--license LICENSE] [--private] [--public] [--push] [--remote REMOTE] [--source SOURCE] [--team TEAM] [--template TEMPLATE] # Create a new repository
gh repo delete [<repository>] [--yes] # Delete a repository
gh repo deploy-key add <key-file> [--allow-write] [--title TITLE] # Add a deploy key to a GitHub repository
gh repo deploy-key delete <key-id> # Delete a deploy key from a GitHub repository
gh repo deploy-key list [--jq JQ] [--json JSON] [--template TEMPLATE] # List deploy keys in a GitHub repository
gh repo edit [<repository>] [--accept-visibility-change-consequences] [--add-topic ADD-TOPIC] [--allow-forking] [--allow-update-branch] [--default-branch DEFAULT-BRANCH] [--delete-branch-on-merge] [--description DESCRIPTION] [--enable-advanced-security] [--enable-auto-merge] [--enable-discussions] [--enable-issues] [--enable-merge-commit] [--enable-projects] [--enable-rebase-merge] [--enable-secret-scanning] [--enable-secret-scanning-push-protection] [--enable-squash-merge] [--enable-wiki] [--homepage HOMEPAGE] [--remove-topic REMOVE-TOPIC] [--squash-merge-commit-message SQUASH-MERGE-COMMIT-MESSAGE] [--template] [--visibility VISIBILITY] # Edit repository settings
gh repo fork [<repository>] [-- <gitflags>...] [--clone] [--default-branch-only] [--fork-name FORK-NAME] [--org ORG] [--remote] [--remote-name REMOTE-NAME] # Create a fork of a repository
gh repo gitignore list # List available repository gitignore templates
gh repo gitignore view <template> # View an available repository gitignore template
gh repo license list # List common repository licenses
gh repo license view {<license-key> | <spdx-id>} [--web] # View a specific repository license
gh repo list [<owner>] [--archived] [--fork] [--jq JQ] [--json JSON] [--language LANGUAGE] [--limit N] [--no-archived] [--source] [--template TEMPLATE] [--topic TOPIC] [--visibility VISIBILITY] # List repositories owned by user or organization
gh repo rename [<new-name>] [--repo REPO] [--yes] # Rename a repository
gh repo set-default [<repository>] [--unset] [--view] # Configure default repository for this directory
gh repo sync [<destination-repository>] [--branch BRANCH] [--force] [--source SOURCE] # Sync a repository
gh repo unarchive [<repository>] [--yes] # Unarchive a repository
gh repo view [<repository>] [--branch BRANCH] [--jq JQ] [--json JSON] [--template TEMPLATE] [--web] # View a repository
gh ruleset check [<branch>] [--default] [--web] # View rules that would apply to a given branch
gh ruleset list [--limit N] [--org ORG] [--parents] [--web] # List rulesets for a repository or organization
gh ruleset view [<ruleset-id>] [--org ORG] [--parents] [--web] # View information about a ruleset
gh run cancel [<run-id>] [--force] # Cancel a workflow run
gh run delete [<run-id>] # Delete a workflow run
gh run download [<run-id>] [--dir DIR] [--name NAME] [--pattern PATTERN] # Download artifacts generated by a workflow run
gh run list [--all] [--branch BRANCH] [--commit COMMIT] [--created CREATED] [--event EVENT] [--jq JQ] [--json JSON] [--limit N] [--status STATUS] [--template TEMPLATE] [--user USER] [--workflow WORKFLOW] # List recent workflow runs
gh run rerun [<run-id>] [--debug] [--failed] [--job JOB] # Rerun a run
gh run view [<run-id>] [--attempt ATTEMPT] [--exit-status] [--job JOB] [--jq JQ] [--json JSON] [--log] [--log-failed] [--template TEMPLATE] [--verbose] [--web] # View a summary of a workflow run
gh run watch <run-id> [--compact] [--exit-status] [--interval N] # Watch a run until it completes, showing its progress
gh search code <query> [--extension EXTENSION] [--filename FILENAME] [--jq JQ] [--json JSON] [--language LANGUAGE] [--limit N] [--match MATCH] [--owner OWNER] [--repo REPO] [--size SIZE] [--template TEMPLATE] [--web] # Search within code
gh search commits [<query>] [--author AUTHOR] [--author-date AUTHOR-DATE] [--author-email AUTHOR-EMAIL] [--author-name AUTHOR-NAME] [--committer COMMITTER] [--committer-date COMMITTER-DATE] [--committer-email COMMITTER-EMAIL] [--committer-name COMMITTER-NAME] [--hash HASH] [--jq JQ] [--json JSON] [--limit N] [--merge] [--order ORDER] [--owner OWNER] [--parent PARENT] [--repo REPO] [--sort SORT] [--template TEMPLATE] [--tree TREE] [--visibility VISIBILITY] [--web] # Search for commits
gh search issues [<query>] [--app APP] [--archived] [--assignee ASSIGNEE] [--author AUTHOR] [--closed CLOSED] [--commenter COMMENTER] [--comments COMMENTS] [--created CREATED] [--include-prs] [--interactions INTERACTIONS] [--involves INVOLVES] [--jq JQ] [--json JSON] [--label LABEL] [--language LANGUAGE] [--limit N] [--locked] [--match MATCH] [--mentions MENTIONS] [--milestone MILESTONE] [--no-assignee] [--no-label] [--no-milestone] [--no-project] [--order ORDER] [--owner OWNER] [--project PROJECT] [--reactions REACTIONS] [--repo REPO] [--sort SORT] [--state STATE] [--team-mentions TEAM-MENTIONS] [--template TEMPLATE] [--updated UPDATED] [--visibility VISIBILITY] [--web] # Search for issues
gh search prs [<query>] [--app APP] [--archived] [--assignee ASSIGNEE] [--author AUTHOR] [--base BASE] [--checks CHECKS] [--closed CLOSED] [--commenter COMMENTER] [--comments COMMENTS] [--created CREATED] [--draft] [--head HEAD] [--interactions INTERACTIONS] [--involves INVOLVES] [--jq JQ] [--json JSON] [--label LABEL] [--language LANGUAGE] [--limit N] [--locked] [--match MATCH] [--mentions MENTIONS] [--merged] [--merged-at MERGED-AT] [--milestone MILESTONE] [--no-assignee] [--no-label] [--no-milestone] [--no-project] [--order ORDER] [--owner OWNER] [--project PROJECT] [--reactions REACTIONS] [--repo REPO] [--review REVIEW] [--review-requested REVIEW-REQUESTED] [--reviewed-by REVIEWED-BY] [--sort SORT] [--state STATE] [--team-mentions TEAM-MENTIONS] [--template TEMPLATE] [--updated UPDATED] [--visibility VISIBILITY] [--web] # Search for pull requests
gh search repos [<query>] [--archived] [--created CREATED] [--followers FOLLOWERS] [--forks FORKS] [--good-first-issues GOOD-FIRST-ISSUES] [--help-wanted-issues HELP-WANTED-ISSUES] [--include-forks INCLUDE-FORKS] [--jq JQ] [--json JSON] [--language LANGUAGE] [--license LICENSE] [--limit N] [--match MATCH] [--number-topics NUMBER-TOPICS] [--order ORDER] [--owner OWNER] [--size SIZE] [--sort SORT] [--stars STARS] [--template TEMPLATE] [--topic TOPIC] [--updated UPDATED] [--visibility VISIBILITY] [--web] # Search for repositories
gh secret delete <secret-name> [--app APP] [--env ENV] [--org ORG] [--user] # Delete secrets
gh secret list [--app APP] [--env ENV] [--jq JQ] [--json JSON] [--org ORG] [--template TEMPLATE] [--user] # List secrets
gh secret set <secret-name> [--app APP] [--body BODY] [--env ENV] [--env-file ENV-FILE] [--no-repos-selected] [--no-store] [--org ORG] [--repos REPOS] [--user] [--visibility VISIBILITY] # Create or update secrets
gh ssh-key add [<key-file>] [--title TITLE] [--type TYPE] # Add an SSH key to your GitHub account
gh ssh-key delete <id> [--yes] # Delete an SSH key from your GitHub account
gh ssh-key list # Lists SSH keys in your GitHub account
gh status [--exclude EXCLUDE] [--org ORG] # Print information about relevant issues, pull requests, and notifications across repositories
gh variable delete <variable-name> [--env ENV] [--org ORG] # Delete variables
gh variable get <variable-name> [--env ENV] [--jq JQ] [--json JSON] [--org ORG] [--template TEMPLATE] # Get variables
gh variable list [--env ENV] [--jq JQ] [--json JSON] [--org ORG] [--template TEMPLATE] # List variables
gh variable set <variable-name> [--body BODY] [--env ENV] [--env-file ENV-FILE] [--org ORG] [--repos REPOS] [--visibility VISIBILITY] # Create or update variables
gh workflow disable [<workflow-id> | <workflow-name>] # Disable a workflow
gh workflow enable [<workflow-id> | <workflow-name>] # Enable a workflow
gh workflow list [--all] [--jq JQ] [--json JSON] [--limit N] [--template TEMPLATE] # List workflows
gh workflow run [<workflow-id> | <workflow-name>] [--field FIELD] [--json] [--raw-field RAW-FIELD] [--ref REF] # Run a workflow by creating a workflow_dispatch event
gh workflow view [<workflow-id> | <workflow-name> | <filename>] [--ref REF] [--web] [--yaml] # View the summary of a workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment