Posts

gh-inspector: inspect GitHub orgs without cloning

·
2 min read

A CLI tool that scans GitHub organizations for dependency versions, CODEOWNERS, and Python version targets, all without cloning a single repo.

Python
Open Source
CLI
GitHub
GitHub CLI logo

Migrating Pydantic v1 to v2 across a large codebase at Perk meant answering a simple question first: which repos are affected and what version are they on? The answer meant cloning repos, grepping lock files, and comparing results by hand.

gh-inspector grew out of that migration. What started as a one-off script became an essential tool for inspecting an entire GitHub organization in seconds. It delegates authentication to the gh CLI and uses the GitHub API to scan dependency files, CODEOWNERS, and Python version markers across every repo, no local clones required.

View the repository on GitHub

Running a CLI tool is faster and cheaper than asking an LLM or an agentic framework to do the same thing. The answer is deterministic, the cost is near zero, and you get it immediately.

Three commands cover the main use cases:

  • find-python-library: scan requirements*.txt, uv.lock, poetry.lock, and more to report which version of a library each repo pins.
  • find-codeowners: parse CODEOWNERS files and display a tree grouped by owner, with optional team filtering.
  • find-python-version: detect the Python version each repo targets from Dockerfiles, pyproject.toml, .python-version, GitHub Actions workflows, and others.

Install it with pip or uv:

pip install gh-inspector
# or
uv tool install gh-inspector