Skip to content

iterabloom/hypergumbo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,972 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

hypergumbo

CI PyPI License Coverage

hypergumbo is a local-first CLI that generates behavior maps and sketches from source code. Helps developers and LLMs quickly understand a codebase.

pip install hypergumbo

Requires Python 3.10+. Includes PyTorch (~1.5GB) for embedding-based features. For a lighter install without embeddings: pip install hypergumbo-core hypergumbo-lang-mainstream hypergumbo-lang-common hypergumbo-lang-extended1

Intel Mac users: Some tree-sitter packages lack x86_64 wheels. See docs/INTEL_MAC.md for a Docker-based workaround.

git clone https://codeberg.org/iterabloom/hypergumbo
hypergumbo hypergumbo/

Output:

# hypergumbo

hypergumbo hypergumbo is a local-first CLI that generates behavior maps and sketches from source code. Helps developers and LLMs quickly understand a codebase. > Requires Python 3.10+. Intel Mac users: Some tree-sitter packages lack x86_64 wheels.

## Overview
Python (88%), Markdown (6%), Yaml (4%)
495 files    (321 non-test + 174 test)
~186,506 LOC (~96,384 non-test + ~90,122 test)

## Structure

` ` `
hypergumbo/
├── .agent
│   ├── stop_reflect.md
│   └── [and 3 other items]
├── .githooks
│   ├── commit-msg
│   └── [and 7 other items]
├── docs
│   ├── future
│   │   └── registry-factory-vision.md
│   └── [and 23 other items]
├── packages
│   ├── hypergumbo
│   │   ├── pyproject.toml
│   │   └── [and 2 other items]
│   ├── hypergumbo-core
│   │   ├── src
│   │   │   └── hypergumbo_core
│   │   │       ├── cli.py
│   │   │       ├── ir.py
│   │   │       └── [and 27 other items]
│   │   ├── tests
│   │   │   ├── test_framework_patterns.py
│   │   │   └── [and 63 other items]
│   │   ├── pyproject.toml
│   │   └── [and 1 other items]
│   └── [and 3 other items]
├── scripts
│   ├── hypergumbo_diag.py
│   └── [and 24 other items]
├── .gitignore
├── ALLOWED_WEBSITES.md
├── README.md
├── conftest.py
├── pyproject.toml
└── [and 18 other items]
` ` `

## Frameworks

- pytest
- transformers

## Tests

174 test files · pytest, unittest

*~90% estimated coverage (1960/2179 functions called by tests)*

## Configuration
[...]

See full example output

Use -t to control the token budget:

hypergumbo . -t 1000   # brief overview (structure only)
hypergumbo . -t 4000   # good balance for most LLMs
hypergumbo . -t 8000   # detailed with many symbols

Two Outputs

Sketch (hypergumbo .) — Token-budgeted Markdown sized for LLM context windows. Ranks symbols by graph centrality (★ = most connected).

Behavior map (hypergumbo run) — Full JSON with all symbols, edges, and provenance tracking. Use this for programmatic analysis.

CLI Commands

hypergumbo [path]              # Markdown sketch (default)
hypergumbo run [path]          # Full JSON behavior map
hypergumbo slice --entry X     # Subgraph from entry point
hypergumbo routes [path]       # List HTTP routes
hypergumbo search <query>      # Search symbols
hypergumbo symbols [path]      # Browse symbols with connectivity
hypergumbo explain <symbol>    # Detailed symbol info
hypergumbo test-coverage       # Analyze test coverage (transitive)
hypergumbo catalog             # List analysis passes

Useful flags:

hypergumbo . -x                # exclude test files (faster)
hypergumbo . --with-source     # append full source code
hypergumbo . --no-progress     # hide progress indicator (on by default)
hypergumbo --help --all        # comprehensive help for all commands

Results are automatically cached in ~/.cache/hypergumbo/. Just run:

hypergumbo .    # auto-runs analysis if no cache exists, then generates sketch

The cache auto-invalidates when source files change. See docs/CACHE.md for details.

See hypergumbo --help for all options.

What It Understands

  • Language analyzers: Python, JS/TS, Java, Rust, Go, C/C++, and many more
  • Cross-language linkers: JNI, HTTP, WebSocket, gRPC, GraphQL, message queues (full list)
  • Framework patterns: FastAPI, Django, Rails, Spring Boot, Phoenix, Express, and many more

How It Works

  1. Profile: Scan the repo for languages, file counts, LOC
  2. Analyze: Run language-specific analyzers to extract symbols and edges
  3. Link: Connect symbols across language boundaries (JS fetch → Python route)
  4. Enrich: Detect frameworks via YAML pattern matching
  5. Output: Generate Markdown sketch or JSON behavior map

The Internal Representation

All analyzers produce the same IR types:

  • Symbol: A code element (function, class, method) with name, location, and stable ID
  • Edge: A relationship between symbols (calls, imports, extends, implements)
  • Span: Source location (file, line, column)

This uniform IR is what allows all language analyzers and cross-language linkers to work together coherently.

Architecture

packages/
├── hypergumbo-core/           # CLI, IR, slice, sketch, linkers
│   └── src/hypergumbo_core/
│       ├── cli.py             # Entry point
│       ├── ir.py              # Symbol, Edge, Span
│       ├── sketch.py          # Token-budgeted Markdown
│       ├── slice.py           # Subgraph extraction
│       ├── linkers/           # Cross-language linkers
│       └── frameworks/        # Framework detection (YAML patterns)
├── hypergumbo-lang-mainstream/  # Python, JS, Java, Go, Rust, etc.
├── hypergumbo-lang-common/      # Haskell, Elixir, GraphQL, etc.
├── hypergumbo-lang-extended1/   # Zig, Solidity, Agda, etc.
└── hypergumbo/                  # Meta-package (installs all above)

Key design choices:

  • Registry pattern: Analyzers and linkers self-register via decorators
  • Two-pass analysis: First collect symbols, then resolve edges (enables cross-file references)
  • Provenance tracking: Every edge records which analyzer/linker created it
  • YAML-driven patterns: Framework detection is declarative, not hardcoded

Development

git clone https://codeberg.org/iterabloom/hypergumbo.git
cd hypergumbo
python3 -m venv .venv && source .venv/bin/activate
./scripts/dev-install
./scripts/install-hooks
source .venv/bin/activate  # reload to enable pytest alias
pytest                      # runs smart-test (affected tests only)

After install-hooks, pytest is aliased to ./scripts/smart-test, which runs only tests affected by your changes. 100% test coverage required.

See CONTRIBUTING.md for PR workflow (including fork-based workflow for external contributors), smart test selection setup, and coverage requirements. Agent instructions live in AGENTS.md.

Links

License

AGPL-3.0-or-later

Hypergumbo logo

About

Local-first repo behavior map generator | read-only mirror of https://codeberg.org/iterabloom/hypergumbo

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published