Local-first repo behavior map generator (MVP)
Project description
hypergumbo
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+. 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
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.
## Overview
Python (91%), Markdown (6%), Yaml (2%)
335 files (201 non-test + 134 test)
~130,574 LOC (~66,411 non-test + ~64,163 test)
## Structure
` ` `
hypergumbo/
├── .github
│ └── workflows
│ ├── release-mirror.yml
│ └── [and 2 other items]
├── docs
│ ├── hypergumbo-spec.md
│ └── [and 20 other items]
├── scripts
│ ├── auto-pr
│ └── [and 16 other items]
├── src
│ └── hypergumbo
│ ├── ir.py
│ └── [and 29 other items]
├── tests
│ ├── test_sketch.py
│ └── [and 133 other items]
├── package.json
├── pyproject.toml
└── [and 20 other items]
` ` `
## Frameworks
- openai
- pytest
- pytorch
- transformers
## Tests
135 test files · pytest, unittest
*~92% estimated coverage (1329/1442 functions called by tests)*
## Configuration
[...]
See full example output | With --with-source
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
- 67 language analyzers: Python, JS/TS, Java, Rust, Go, C/C++, and many more (full list)
- 15 cross-language linkers: JNI, HTTP, WebSocket, gRPC, GraphQL, message queues (full list)
- 37 framework patterns: FastAPI, Django, Rails, Spring Boot, Phoenix, Express, etc.
How It Works
- Profile: Scan the repo for languages, file counts, LOC
- Analyze: Run language-specific analyzers to extract symbols and edges
- Link: Connect symbols across language boundaries (JS fetch → Python route)
- Enrich: Detect frameworks via YAML pattern matching
- 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 67 language analyzers and 15 cross-language linkers to work together coherently.
Architecture
src/hypergumbo/
├── cli.py # Entry point, argument parsing
├── profile.py # Repository scanning (languages, LOC)
├── ir.py # Internal representation (Symbol, Edge, Span)
├── sketch.py # Markdown generation with token budgeting
├── ranking.py # Graph centrality for symbol importance
├── analyze/ # 67 language analyzers
├── linkers/ # 15 cross-language linkers
├── frameworks/ # 37 YAML pattern definitions
└── selection/ # Token budget allocation
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
pip install -e .[dev]
./scripts/install-hooks
pytest -n auto --cov=src --cov-fail-under=100 # parallel (~2 min)
100% test coverage required. All agent instructions live in AGENTS.md. Vendor-specific files (CLAUDE.md, GEMINI.md, etc.) are thin adapters that import the canonical source.
Links
- docs/USE-CASES.md — Practical workflows and examples
- CHANGELOG.md — Implementation history
- docs/LANGUAGES.md — All 67 supported languages
- docs/LINKERS.md — All 15 cross-language linkers
- docs/hypergumbo-spec.md — Detailed specification
- docs/CITATIONS.md — Paper citations for embedding models
- docs/CACHE.md — Caching architecture
- SECURITY.md — Vulnerability reporting
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hypergumbo-1.2.1.tar.gz.
File metadata
- Download URL: hypergumbo-1.2.1.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c8297e7ca0ecf8de3198390aae43713b8297351f39f102f196526b11a2f9a1c
|
|
| MD5 |
4658bb7d76c7373d4e25dad03bb98c51
|
|
| BLAKE2b-256 |
f78249f0468498523073b86380f6dd3f01f7de8ccfb4912079bb363bfa853d6e
|
File details
Details for the file hypergumbo-1.2.1-py3-none-any.whl.
File metadata
- Download URL: hypergumbo-1.2.1-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aac936a89bc8740856da7dbc12c48d5464d3220b8023ecd04087736bde647534
|
|
| MD5 |
c872b4f63adbd9120e281567b65b3bce
|
|
| BLAKE2b-256 |
00839222ca156077787bbce0ffa5107943c07daa3d006763249ca945792386f2
|