Open-Source Wikis

/

GitHub CLI

/

Commands

cli/cli

Commands

Every user-facing gh command is a Go package under pkg/cmd/<command>/<subcommand>/ with a bar.go and bar_test.go. Top-level commands are registered in pkg/cmd/root/root.go and grouped into the help groups core, actions, extension, and alias. This section documents each meaningful command tree.

Where commands live

graph LR
    root[pkg/cmd/root.NewCmdRoot] -->|core| Issue
    root --> PR
    root --> Repo
    root --> Auth
    root --> Config
    root --> Codespace
    root --> Project
    root --> Release
    root --> Search
    root --> Skills
    root --> Copilot
    root --> AgentTask[agent-task]
    root --> Status
    root --> Browse
    root -->|actions| Run
    root --> Workflow
    root --> Cache
    root --> Secret
    root --> Variable
    root -->|extension| Extension
    root --> APIcmd[api]
    root --> Attestation
    root --> Other[gist / org / label / ruleset / ssh-key / gpg-key / alias / completion / version / preview / accessibility / send-telemetry / licenses]

The "smart" repo resolver is used for pr, issue, repo, release, org, ruleset, run, workflow, label, cache, api, agent-task, and browse. The other commands use the simple resolver (or no repo at all).

Sub-pages

Every command page uses the same shape: purpose, directory layout, key abstractions, how it works, integration points, and entry points for modification.

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

Commands – GitHub CLI wiki | Factory