A gh extension that collects an org's teams, members, repos, and CODEOWNERS
into one JSON file and renders it as a self-contained, offline HTML explorer.
GitHub spreads access information across team pages, repo settings, and CODEOWNERS files in each repository. Answering "which teams can push to this repo?" or "what does this person have admin on?" means clicking through all of them.
gh-org-view gathers it in one pass and gives you a single page to browse by team, user, or repo, with each grant's permission level. The data lands in a plain JSON file you can edit, script against with jq, or publish as a static site.
[!NOTE]
This is a permission and ownership view, not a management org chart. GitHub teams reflect access grouping, not reporting lines.
Features
Four views — Teams (as a parent/child tree), Users, Repos, and a collapsible Chart of the team hierarchy
Permission-aware — every team and direct-collaborator grant shows its level: admin, maintain, push, triage, pull
Member roles — org owners vs. members, team maintainers vs. members
CODEOWNERS attribution — scans CODEOWNERS, .github/CODEOWNERS, and docs/CODEOWNERS in admin/maintain repos and maps paths to teams
Fast navigation — / to filter, arrow keys to move, Esc to clear; every view and entity has a shareable URL hash
Offline and self-contained — one HTML file with the data embedded, light and dark themes
Cached and editable — the JSON is reused for 24 hours, and hand edits survive re-runs until --refresh
Installation
gh extension install jackchuka/gh-org-view
Requires the GitHub CLI authenticated with the read:org scope:
gh auth refresh -s read:org
Teams, team membership, and repo collaborators are only visible to members of the organization. On orgs you do not belong to it still works, but shows public repos only.
From source
git clone https://github.com/jackchuka/gh-org-view.git
cd gh-org-view
go build -o gh-org-view .
gh extension install .
Quick Start
gh org-view my-org
This collects the org (or reuses a cache newer than 24 hours), writes the explorer, opens it in your browser, and prints a summary:
Print the canonical JSON to stdout; skip HTML render and open
--no-open
Render the HTML but do not open a browser
--out-dir <dir>
Write index.html and org.json into <dir> (implies --no-open)
Examples
# Large org: skip the per-repo CODEOWNERS scan
gh org-view my-org --no-codeowners
# Which repos does the "platform" team administer?
gh org-view my-org --json \
| jq -r '.teams[] | select(.slug == "platform") | .repos[] | select(.permission == "admin") | .name'
# Build a static site in CI (for example, to publish with GitHub Pages)
gh org-view my-org --refresh --out-dir ./site
Output
Files are written to ${TMPDIR:-/tmp}/gh-org-view/:
File
Contents
<org>-org.json
Canonical data; the 24-hour cache, safe to edit by hand
Package github collects an organization's team/member/repo/CODEOWNERS topology from the GitHub GraphQL API (CODEOWNERS file contents via REST) into a canonical, JSON-serializable model.
Package github collects an organization's team/member/repo/CODEOWNERS topology from the GitHub GraphQL API (CODEOWNERS file contents via REST) into a canonical, JSON-serializable model.