Skip to main content

Dissect any codebase in seconds

Project description

Gitopsy — Dissect any codebase in seconds

Gitopsy PyPI License: MIT

One command. Instant codebase intelligence.

Gitopsy analyzes any repository and produces a self-contained HTML report covering architecture, tech debt, onboarding, dependencies, conventions, APIs, security surface, and setup — everything you need to understand an unfamiliar codebase.

Install

pip install gitopsy

Usage

gitopsy .                          # Analyze current directory
gitopsy /path/to/repo              # Analyze any repo
gitopsy --output report.html .     # Custom output path
gitopsy --analyzers arch,debt .    # Run specific analyzers
gitopsy --json .                   # Output raw JSON
gitopsy --badge .                  # Also write a grade SVG badge
gitopsy --save-json .              # Save JSON snapshot alongside HTML

Subcommands

# Generate a grade badge SVG
gitopsy badge .
gitopsy badge /path/to/repo --output my-badge.svg

# Compare two JSON snapshots
gitopsy --save-json .              # capture snapshot.json
# ... make changes, then re-analyze ...
gitopsy --save-json --output new.html .
gitopsy diff gitopsy-report.json new.json --output diff-report.html

What's in the report?

Tab What it tells you
Architecture Project type, framework, entry points, dependency graph
Tech Debt Score (A-F), hotspots, top 5 recommendations
Onboarding Summary, key files, setup steps, contributors, gotchas
Dependencies All deps with versions, licenses, outdated flags
Conventions Naming, formatting, import style, consistency score
APIs All HTTP routes, CLI commands, public exports
Security Secrets, SQL injection, CORS, auth patterns, risk level
Setup Prerequisites, install steps, env vars, run commands

GitHub Action

- uses: UJameel/gitopsy@v1
  with:
    path: '.'
    output: 'gitopsy-report.html'

Full example workflow:

name: Gitopsy Analysis
on: [push]
jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - uses: UJameel/gitopsy@v1
        with:
          path: '.'
          output: 'gitopsy-report.html'
          upload-artifact: 'true'

The action outputs report-path and overall-grade for use in downstream steps.

Python API

from gitopsy.orchestrator import analyze
from gitopsy.report.renderer import render
from gitopsy.report.badge import generate_badge

report = analyze("/path/to/repo")
render(report, "/tmp/report.html")

# Access structured data
print(report.architecture.framework)   # "flask"
print(report.tech_debt.grade)          # "B"
print(report.tech_debt.overall_score)  # 72

# Generate a badge
svg = generate_badge(report.tech_debt.grade, report.tech_debt.overall_score)

As a Claude Code skill

The skills/gitopsy/ directory ships a Claude Code skill. Copy it to your ~/.claude/skills/ directory and run /gitopsy from any project.

Example reports

Live example reports generated by Gitopsy on popular open-source projects:

Design principles

  • Offline-first — zero mandatory API calls
  • Fast — <30s on a 10,000-file repo
  • Self-contained — single HTML file, no external deps to view
  • Git-optional — works on any directory
  • No AI required — all analysis is deterministic

Development

git clone https://github.com/UJameel/gitopsy
cd gitopsy
pip install -e ".[dev]"
pytest

See CONTRIBUTING.md for how to add new analyzers.

License

MIT — see LICENSE.

Project details


Download files

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

Source Distribution

gitopsy-0.1.0.tar.gz (59.3 kB view details)

Uploaded Source

Built Distribution

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

gitopsy-0.1.0-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file gitopsy-0.1.0.tar.gz.

File metadata

  • Download URL: gitopsy-0.1.0.tar.gz
  • Upload date:
  • Size: 59.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gitopsy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c82ac6c4c4f217197755246704ce27ae306ec9e1a618904f659a336239104d9e
MD5 30b6dc192c4b6a5fa774f34de3e1c371
BLAKE2b-256 06e5d6573722f6474b3f4d768fb4090d8c8e87d9ffa86e5712706f70fb014c58

See more details on using hashes here.

File details

Details for the file gitopsy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitopsy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gitopsy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46fc0cd443335afb8ce339732202be9c26ee8eab4435ad3868025d2d8c86e822
MD5 771fe2549d278dec58598cb1d99ec9c4
BLAKE2b-256 6bcc3d45e634222ceeeae8dfef71bc93da7cbe9615d920fbc129253ee4b9cbdf

See more details on using hashes here.

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