Open-Source Wikis

/

GitHub CLI

/

By the numbers

cli/cli

By the numbers

Data collected on 2026-04-30 against commit 611b01f6 on branch trunk.

Size

The project is overwhelmingly Go, with smaller pockets of YAML (CI, GoReleaser), Markdown (docs), and shell scripts (release tooling).

xychart-beta horizontal
    title "Source files by language (top-level)"
    x-axis [Go, Markdown, YAML, Shell]
    y-axis "files"
    bar [854, 36, 20, 16]
  • Total Go source lines (non-vendored): ~241,100
  • Go source files: 854
  • Go test files: 339 (40% of all .go files)
  • Test-to-code ratio (file count): ~0.66 tests per implementation file
  • Total commits on trunk: 11,228
  • First commit: 2019-10-03 ("initial commit")
  • Latest commit: 2026-04-30

The biggest top-level source areas, by disk footprint:

Directory Size What it holds
pkg/ 20 MB All command implementations and shared pkg/* libraries
docs/ 1.5 MB Contributor and release documentation
internal/ 1.2 MB Internal Go packages (config, telemetry, codespaces runtime, skills, ...)
acceptance/ 620 KB End-to-end test fixtures behind the acceptance build tag
api/ 336 KB GitHub REST + GraphQL queries
git/ 164 KB Git executable wrapper
script/ 84 KB Release and build scripts

Activity

Commit volume is sustained: ~150-300 commits per month over the past two years, with peaks during release cuts and large feature pushes (skills, attestation, agent-task).

Recent monthly commit counts on trunk:

Month Commits
2025-09 285
2025-10 119
2025-11 62
2025-12 75
2026-01 98
2026-02 119
2026-03 186
2026-04 174

Churn hotspots (last 90 days)

The top files modified in the last 90 days reveal where active development is happening:

File Change events
go.mod / go.sum 70 (dependency churn)
pkg/cmd/skills/install/install.go 18
pkg/cmd/skills/publish/publish_test.go 17
pkg/cmd/skills/publish/publish.go 17
pkg/cmd/skills/install/install_test.go 16
api/queries_pr.go 16
pkg/cmd/skills/search/search.go 14
pkg/cmd/skills/preview/preview.go 14
pkg/cmd/pr/create/create.go 12

The skills subsystem dominates the recent churn list: it is the newest major area of the codebase and is still being shaped.

By directory (top 90-day write-heavy locations):

Path Touch count
pkg/cmd/... 404
acceptance/testdata/... 90
internal/skills/... 78
.github/workflows/... 35
internal/licenses/... 27
internal/prompter/... 22
internal/featuredetection/... 20
internal/telemetry/... 16
internal/ghcmd/... 11

Bot-attributed commits

Of all 11,228 commits on trunk, 34 carry a Co-authored-by: <name>[bot] trailer (~0.3%). This is a lower bound on AI-assisted work since inline tools like Copilot and Cursor leave no git trace. Practically, this repository's history is human-driven, with bot trailers concentrated in dependency bumps and Copilot-generated PRs.

Complexity

The largest non-test Go files. These are good candidates to skim before changing nearby code:

File Bytes
pkg/cmd/project/shared/queries/queries.go 51,597
api/queries_repo.go 45,824
pkg/cmd/pr/create/create.go 45,693
pkg/cmd/skills/install/install.go 42,132
internal/barista/observability/telemetry.twirp.go 40,598 (generated)
internal/codespaces/api/api.go 37,503
pkg/cmd/skills/publish/publish.go 34,842
pkg/cmd/codespace/mock_api.go 34,680 (generated mock)
internal/skills/discovery/discovery.go 32,749
git/client.go 29,363

Largest test files (also frequently the most expensive to keep green):

File Bytes
pkg/cmd/run/view/view_test.go 104,636
pkg/cmd/pr/create/create_test.go 101,852
pkg/cmd/skills/install/install_test.go 96,684
pkg/cmd/release/create/create_test.go 66,363
git/client_test.go 65,010

TODO debt

  • Files containing TODO/FIXME/HACK/XXX: 104
  • Total occurrences: 248

A meaningful share of those are deliberate // TODO <cleanupIdentifier> markers paired with feature-detection branches: the project's lint enforces that every feature-detected if is guarded by a tracked cleanup ID, which keeps the count high but each entry actionable.

Releases

gh ships on a steady cadence: 9 minor or patch tags in the past 6 months (v2.82.0 through v2.92.0). Releases are produced by .github/workflows/deployment.yml using GoReleaser, signed via Sigstore, and accompanied by SLSA build provenance attestations.

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

By the numbers – GitHub CLI wiki | Factory