Skip to main content

🔍 repoglance

Instant, gorgeous insight into any code repository — in one command.

Point it at any folder. In under a second you get a beautiful terminal report: language breakdown, complexity hotspots, TODO tracker, biggest files, and git activity. Zero config. Zero API keys. Zero telemetry.

CI Python License: MIT PRs Welcome repoglance


Why repoglance?

You clone an unfamiliar repo. What is this thing? How big? What's the messy part? Where's the unfinished work? cloc gives you a wall of numbers. tokei is fast but bare. repoglance answers the human questions in one glance:

repoglance .

repoglance demo

Seen in the wild

repoglance run against well-known projects (click to view the full report):

Project Files Lines of code Health
flask 200 25,030 D (64)
httpie 217 19,604 D (62)
requests 71 13,215 D (69)

flask report

Install

pip install repoglance

Or run without installing:

pipx run repoglance .

Usage

repoglance                       # analyze current directory
repoglance path/to/repo          # analyze another repo
repoglance --json                # machine-readable output for scripts / CI
repoglance --svg report.svg      # export a vector report
repoglance --html report.html    # export a browser report
repoglance --badge badge.svg     # export an embeddable badge
repoglance --ci --max-complexity 25   # fail CI on hotspots
repoglance --no-git              # skip git history
repoglance --ignore dist --ignore fixtures

JSON output

Pipe structured data anywhere — dashboards, CI gates, badges:

repoglance --json | jq '.languages.Python.code'

What it measures

Section What you get
Languages Lines of code per language, ranked, with % bars
Complexity hotspots Per-function cyclomatic complexity (Python via AST; heuristic for other langs)
TODO tracker Every TODO / FIXME / HACK / XXX / BUG with file:line
Biggest files The files most likely to need splitting
Git activity Top authors, most-churned files, active days, project lifespan

Binary files, node_modules, .venv, build dirs and friends are skipped automatically.

More than a counter

repoglance isn't just another cloc. Tools like tokei, cloc and scc answer "how many lines?". repoglance answers "what should I look at?" — and gives you artifacts you can put in a PR or a README.

repoglance tokei scc cloc
Lines-of-code by language
Complexity hotspots (per function) ⚠️ file-level
TODO / FIXME tracker
Git activity (authors, churn)
JSON output
HTML / SVG report export
Embeddable repo badge
CI gate (--max-complexity)
Zero install deps beyond one pip (binary) (binary) (perl)

Share it: badges & reports

Generate a self-contained SVG badge — no shields.io round-trip, no tracking:

repoglance --badge assets/badge.svg

repoglance badge

Export the full report as a standalone file to drop in a PR or wiki:

repoglance --svg report.svg      # vector, pixel-perfect
repoglance --html report.html    # opens in any browser

Guard your codebase in CI

Fail the build when complexity or TODO debt crosses a line:

repoglance --ci --max-complexity 25 --max-todos 100
# .github/workflows/quality.yml
- run: pip install repoglance
- run: repoglance --ci --max-complexity 25

Exit code 0 = clean, 2 = a threshold was exceeded.

Integrations

GitHub Action — comment on every PR

Drop repoglance into any repo. It posts a sticky report comment on pull requests and can gate the build:

# .github/workflows/repoglance.yml
name: repoglance
on: [pull_request]
permissions:
  contents: read
  pull-requests: write
jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: SRJ-ai/repolens@main
        with:
          fail-under: "70"       # optional health gate
          max-complexity: "25"   # optional complexity gate

The report also lands in the workflow's job summary every run.

pre-commit hook

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/SRJ-ai/repolens
    rev: v0.2.0
    hooks:
      - id: repoglance
        args: ["--ci", "--fail-under", "70"]

Self-updating badge

Commit a shields endpoint file and point a dynamic badge at it — the badge refreshes itself, no service to run:

repoglance --badge-json .repolens-badge.json   # commit this file
![repoglance](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/SRJ-ai/repolens/main/.repolens-badge.json)

Markdown anywhere

repoglance --md   # paste into a PR, wiki, or Slack

Design goals

  • Fast — a single os.walk, no external services.
  • Honest — no network, no telemetry, no surprise writes.
  • Pretty — powered by rich.
  • Scriptable — everything the report shows is available as --json.

Contributing

Adding a language is a one-line change in languages.py. PRs welcome — see CONTRIBUTING.md.

License

MIT © repoglance contributors

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repoglance-0.2.1.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repoglance-0.2.1-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file repoglance-0.2.1.tar.gz.

File metadata

  • Download URL: repoglance-0.2.1.tar.gz
  • Upload date:
  • Size: 42.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repoglance-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ccec0b3c6953f012d0e438e0ac554c5a5587fcb89e998051da3c59657d1f597f
MD5 e98f9e17c28d98b82c5b8619f145a2bd
BLAKE2b-256 d15dcd35815153a46cb710039197c8fd77b616e92e7fe0ba2908cd944dfb52da

See more details on using hashes here.

Provenance

The following attestation bundles were made for repoglance-0.2.1.tar.gz:

Publisher: release.yml on SRJ-ai/repolens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repoglance-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: repoglance-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repoglance-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 618425cb8cada0b2023d61005feb6d67d9dc98e40c324746050b4f1517e6f76f
MD5 1f5bf81ecb7b6ab39fa2210cf2f56455
BLAKE2b-256 163457aaaae2de81c55d7dac6626fd32ffe219e3d0188711a0fe72f43d4c877c

See more details on using hashes here.

Provenance

The following attestation bundles were made for repoglance-0.2.1-py3-none-any.whl:

Publisher: release.yml on SRJ-ai/repolens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page