Skip to main content

Local-first repo behavior map generator (MVP)

Project description

hypergumbo

Get a quick overview of any codebase, sized to fit your context window.

Requires Python 3.10+

pip install hypergumbo              # from PyPI
pip install git+https://codeberg.org/iterabloom/hypergumbo.git  # from source
hypergumbo .

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

Output:

# my-project

## Overview
Python (72%), TypeScript (18%), Markdown (10%) · 84 files · ~12,400 LOC

## Structure
- `src/` — Source code
- `tests/` — Tests
- `docs/` — Documentation

## Frameworks
- fastapi
- pytest

## Key Symbols
### `src/api/routes.py`
- `create_user` (function) ★
- `get_user` (function) ★
...

Use -t to control the token budget:

hypergumbo . -t 500   # concise overview
hypergumbo . -t 2000  # include symbols and entry points

CLI Commands

hypergumbo [path]            # default: generate Markdown sketch
hypergumbo . -t 1000         # sketch with 1000 token budget
hypergumbo . -x              # exclude test files (faster on large codebases)
hypergumbo run [path]        # full analysis → hypergumbo.results.json
hypergumbo slice --entry X   # extract subgraph from entry point
hypergumbo slice --entry X --reverse  # find all callers of X
hypergumbo routes [path]     # list HTTP routes (FastAPI, Flask, Express, etc.)
hypergumbo search <query>    # search symbols by name pattern
hypergumbo init [path]       # initialize .hypergumbo/ capsule
hypergumbo init --assistant llm  # use LLM to generate analysis plan
hypergumbo catalog           # list available analysis passes
hypergumbo export-capsule    # export shareable capsule tarball
hypergumbo build-grammars    # build Lean/Wolfram grammars from source

What It Does

Default mode (hypergumbo .) generates a Markdown sketch with:

  • Language breakdown and LOC count
  • Directory structure with labels
  • Framework detection
  • Key symbols ranked by graph centrality (★ = most called)
  • Entry points (CLI, HTTP routes, etc.)

Full analysis (hypergumbo run) outputs a JSON behavior map with:

  • Nodes: Functions, classes, methods, interfaces with location and stable IDs
  • Edges: Relationships between symbols (calls, imports, instantiates, extends, implements)
  • Cross-language edges: 13 linkers connect symbols across language boundaries (see table below)

LLM-assisted init (hypergumbo init --assistant llm) demonstrates LLM integration patterns but provides no practical advantage over the default template-based approach. Since analyzers are language-level (not framework-level), both methods select the same passes. This feature exists as a technical scaffold showing how to integrate OpenRouter, OpenAI, or local models via the llm package. It may be removed in a future release.

Supported Languages (54 Analyzers)

Category Languages
Application Python, JavaScript, TypeScript, Java, C#, F#, Go, Rust, Ruby, PHP, Perl, Swift, Kotlin, Scala, Groovy, Clojure, Erlang, Elixir, Lua, Haskell, OCaml, Julia, R, Dart
Systems C, C++, Zig, Objective-C, CUDA, Fortran
Smart Contracts Solidity
Hardware Verilog, VHDL, GLSL, WGSL
Infrastructure Terraform/HCL, Dockerfile, CMake, Make, Nix, Bash, YAML/Ansible
Data/Schema SQL, GraphQL, JSON, TOML, XML, CSS
Frontend Elm, Vue, Svelte, HTML
Proof/Formal Agda, Lean*, Wolfram*
Legacy/Academic COBOL, LaTeX

* Lean and Wolfram require building tree-sitter grammars from source (not yet on PyPI). Run hypergumbo build-grammars to enable these analyzers.

All analyzers detect symbols and edges (calls, imports, instantiates, extends, implements). See CHANGELOG.md for details.

Cross-Language Linkers (13 Linkers)

Linkers run automatically during hypergumbo run to connect symbols across language boundaries:

Linker Description
JNI Java native methods ↔ C JNI implementations
IPC Electron IPC, Web Workers, postMessage patterns
WebSocket Socket.io, native WebSocket, Django Channels, FastAPI WebSocket
Phoenix Phoenix Channels (broadcast!, push, handle_in) and LiveView
Swift/ObjC @objc annotations, #selector(), bridging headers
gRPC Protobuf services, stubs, and servicer implementations
HTTP fetch(), axios, requests → route handlers (URL pattern matching)
GraphQL gql queries/mutations → schema definitions
GraphQL Resolver Resolver implementations → schema type definitions
Message Queue Kafka, RabbitMQ, SQS, Redis Pub/Sub topic matching
Database Query SQL in app code → table definitions in schema files
Event Sourcing EventEmitter, Django signals, Spring events
Dependency Manifest dependencies (Cargo.toml, pyproject.toml) → code imports

Development

To contribute to hypergumbo:

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
hypergumbo build-grammars  # optional: enables Lean and Wolfram analyzers
pytest

All agent instructions live in AGENTS.md. Vendor-specific files (CLAUDE.md, GEMINI.md, etc.) are thin adapters that import the AGENTS.md canonical source.

See CHANGELOG.md for implementation progress.

Security

To report a vulnerability, see SECURITY.md.

License

AGPL-3.0-or-later

Hypergumbo logo

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

hypergumbo-0.6.9.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

hypergumbo-0.6.9-py3-none-any.whl (511.0 kB view details)

Uploaded Python 3

File details

Details for the file hypergumbo-0.6.9.tar.gz.

File metadata

  • Download URL: hypergumbo-0.6.9.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for hypergumbo-0.6.9.tar.gz
Algorithm Hash digest
SHA256 319d3e890a02993d3a97bdd2c5072a0471ab130a44c039229e9ff5a09a162d61
MD5 1e07b6afd4d77a3b05dbb6c97619492e
BLAKE2b-256 1c19d1b269b0fe3c1b7a7836ee692af97b6932fd258dd7a270b010827a6e98ec

See more details on using hashes here.

File details

Details for the file hypergumbo-0.6.9-py3-none-any.whl.

File metadata

  • Download URL: hypergumbo-0.6.9-py3-none-any.whl
  • Upload date:
  • Size: 511.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for hypergumbo-0.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 adb986cb4752b2d288284c0aea5433af6a9dbbb67dc8252be632cf5448a2efee
MD5 28358254b1eb9353e2dfdeb0fe256b3e
BLAKE2b-256 a5f1934f8435f2e8556969ce1eb509399fc0f834383bbb47eecccc0851b61432

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