Open-Source Wikis

/

GitHub CLI

/

Commands

/

Other commands

cli/cli

Other commands

The remaining top-level commands. Each is small enough to share a page; click through to the source for the full implementation.

gh gist - GitHub Gists

  • Source: pkg/cmd/gist/.
  • Subcommands: create, list, view, edit, delete, clone, rename, shared/.
  • Talks to the Gists REST API. view rendering uses Glamour for markdown.

gh org - Organisation utilities

  • Source: pkg/cmd/org/.
  • Subcommands today: list (a user's orgs). Lives under the smart resolver but does not need a base repo.

gh project - GitHub Projects v2

  • Source: pkg/cmd/project/.
  • Subcommands: create, list, view, edit, close, copy, delete, link, unlink, mark-template, plus a wide set of field-* and item-* subcommands.
  • pkg/cmd/project/shared/queries/queries.go is the largest single file in the repo (~52 KB) because the ProjectsV2 GraphQL schema is exhaustive.

gh label - Issue labels

  • Source: pkg/cmd/label/.
  • Subcommands: list, create, edit, delete, clone (copy labels between repos).

gh ruleset - Repository rulesets

  • Source: pkg/cmd/ruleset/.
  • Subcommands: list, view, check. Renders branch protection and tag protection rulesets.
  • Source: pkg/cmd/search/.
  • Subcommands: code, commits, issues, prs, repos. Uses pkg/search for query construction.

gh ssh-key and gh gpg-key - User keys

gh alias - User-defined aliases

  • Source: pkg/cmd/alias/.
  • Subcommands: set, list, delete, imports (read aliases from a file).
  • Aliases are stored in config and re-registered as Cobra subcommands at startup, with !-prefixed values executed via shlex as shell commands.

gh completion - Shell completion

  • Source: pkg/cmd/completion/.
  • Single subcommand: gh completion -s {bash,zsh,fish,pwsh}. Uses Cobra's built-in completion generators.

gh version - Version output

  • Source: pkg/cmd/version/.
  • Reads internal/build constants. Supports --json for scripted use.

gh status - Cross-repo status dashboard

  • Source: pkg/cmd/status/.
  • Subcommand of root (registered with NewCmdStatus). Renders mentions, review requests, and unread notifications across the user's repos.

gh preview - Preview features

  • Source: pkg/cmd/preview/.
  • A nested area for opt-in/preview surfaces. New experimental commands land here before promotion.

gh send-telemetry - Forward a telemetry payload

  • Source: pkg/cmd/send-telemetry/.
  • Hidden command used internally to relay telemetry from extensions back through the same Twirp pipeline gh itself uses.

gh licenses - Bundled license attributions

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Other commands – GitHub CLI wiki | Factory