Static analysis tool that maps the hidden network of connections in codebases
Project description
Mycelium
Static analysis CLI that maps the connections in a source code repository. Produces a single JSON file containing file structure, symbols, imports, call graph, community clusters, and execution flows.
Install
uvx mycelium-map
Or install locally:
pip install mycelium-map
Usage
mycelium-map analyze <path> # Analyse a repo
mycelium-map analyze <path> -o output.json # Custom output path
mycelium-map analyze <path> --verbose # Show phase timing breakdown
mycelium-map analyze <path> --quiet # No terminal output
mycelium-map analyze <path> -l cs,ts # Only analyse C# and TypeScript
mycelium-map analyze <path> --exclude vendor,legacy # Skip directories
mycelium-map analyze <path> --resolution 1.5 # Louvain resolution (higher = more communities)
mycelium-map analyze <path> --max-processes 50 # Limit execution flows
mycelium-map analyze <path> --max-depth 8 # Limit BFS trace depth
Default output file: <repo-name>.mycelium.json
Supported Languages
| Language | Extensions |
|---|---|
| C# | .cs |
| VB.NET | .vb (requires grammar build) |
| TypeScript | .ts, .tsx |
| JavaScript | .js, .jsx, .mjs, .cjs |
| Python | .py |
| Java | .java |
| Go | .go |
| Rust | .rs |
| C | .c, .h |
| C++ | .cpp, .cc, .cxx, .hpp, .hxx, .hh |
Output Schema
The JSON output contains these top-level sections:
metadata
{
"repo_name": "my-project",
"repo_path": "/absolute/path",
"analysed_at": "2026-02-05T18:33:12Z",
"mycelium_version": "0.1.0",
"commit_hash": "a1b2c3d4e5f6",
"analysis_duration_ms": 42.3,
"phase_timings": { "structure": 0.004, "parsing": 0.001, ... }
}
stats
Summary counts: files, folders, symbols, calls, imports, communities, processes, and a languages breakdown by file count.
structure
File tree with language, size, and line counts.
{
"files": [{ "path": "src/main.cs", "language": "cs", "size": 1024, "lines": 45 }],
"folders": [{ "path": "src/", "file_count": 3 }]
}
symbols
Every extracted symbol: classes, methods, interfaces, functions, structs, enums, etc.
{
"id": "sym_0001",
"name": "UserController",
"type": "Class",
"file": "Controllers/UserController.cs",
"line": 8,
"visibility": "public",
"exported": true,
"parent": "MyApp.Controllers",
"language": "cs"
}
Symbol types: Class, Function, Method, Interface, Struct, Enum, Namespace, Property, Constructor, Module, Record, Delegate, TypeAlias, Constant, Trait, Impl, Macro, Typedef, Annotation.
Visibility: public, private, internal, protected.
imports
Three categories of dependency edges:
{
"file_imports": [{ "from": "Controller.cs", "to": "Service.cs", "statement": "using MyApp.Services" }],
"project_references": [{ "from_project": "Web.csproj", "to_project": "Core.csproj", "ref_type": "ProjectReference" }],
"package_references": [{ "project": "Web.csproj", "package": "Newtonsoft.Json", "version": "13.0.1" }]
}
Project and package references are extracted from .csproj/.vbproj files.
calls
Call graph edges with three-tier confidence scoring:
{
"from": "sym_0004",
"to": "sym_0015",
"confidence": 0.9,
"tier": "A",
"reason": "import-resolved",
"line": 17
}
| Tier | Confidence | Meaning |
|---|---|---|
| A | 0.9 | Callee found in an imported file |
| B | 0.85 | Callee found in the same file |
| C | 0.5 | Unique fuzzy match across the codebase |
| C | 0.3 | Ambiguous fuzzy match (multiple candidates) |
communities
Clusters of symbols that frequently call each other, detected via Louvain algorithm.
{
"id": "community_0",
"label": "Absence",
"members": ["sym_0004", "sym_0015", "sym_0016"],
"cohesion": 0.8,
"primary_language": "cs"
}
processes
Execution flows traced from entry points (controllers, handlers, main functions) via BFS through the call graph.
{
"id": "process_0",
"entry": "sym_0004",
"terminal": "sym_0016",
"steps": ["sym_0004", "sym_0015", "sym_0016"],
"type": "intra_community",
"total_confidence": 0.765
}
type is intra_community when all steps are in the same community, or cross_community when the flow spans multiple.
total_confidence is the product of all edge confidences along the path.
Development
uv sync # Install dependencies
uv run pytest # Run tests
uv run pytest -v # Verbose output
Releasing
Releases are automated via GitHub Actions. Push a semver tag to trigger a release:
git tag v0.2.0
git push origin v0.2.0
This will:
- Update the version in
pyproject.tomlto match the tag - Commit the version bump back to
master - Build and publish the package to PyPI
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
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 mycelium_map-0.2.0.tar.gz.
File metadata
- Download URL: mycelium_map-0.2.0.tar.gz
- Upload date:
- Size: 115.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbe654792b725e1725e697c25251782c5e9a7360be8bbcf62d16ea0d71763dbe
|
|
| MD5 |
78f674e1bbd50e122817eaa29e01ad0e
|
|
| BLAKE2b-256 |
5c4e8e76725044f6a3417db550bf8f5c9e2eea74c366a5980ece417f0c8275d7
|
Provenance
The following attestation bundles were made for mycelium_map-0.2.0.tar.gz:
Publisher:
release.yml on ScottRBK/mycelium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mycelium_map-0.2.0.tar.gz -
Subject digest:
fbe654792b725e1725e697c25251782c5e9a7360be8bbcf62d16ea0d71763dbe - Sigstore transparency entry: 944759040
- Sigstore integration time:
-
Permalink:
ScottRBK/mycelium@5910c625e020a42bcc2ad0efdadd6b1053cedd5c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ScottRBK
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5910c625e020a42bcc2ad0efdadd6b1053cedd5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file mycelium_map-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mycelium_map-0.2.0-py3-none-any.whl
- Upload date:
- Size: 55.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6916953524bc48c27c1b809fad600ce355c814de41852bc157c3e1473d6f5679
|
|
| MD5 |
02b471c301e120cc8937a49ee23099f2
|
|
| BLAKE2b-256 |
69f787cd1aadcb666231deb88f490ab59caa14bea769f715c8dac7af4860a0bb
|
Provenance
The following attestation bundles were made for mycelium_map-0.2.0-py3-none-any.whl:
Publisher:
release.yml on ScottRBK/mycelium
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mycelium_map-0.2.0-py3-none-any.whl -
Subject digest:
6916953524bc48c27c1b809fad600ce355c814de41852bc157c3e1473d6f5679 - Sigstore transparency entry: 944759060
- Sigstore integration time:
-
Permalink:
ScottRBK/mycelium@5910c625e020a42bcc2ad0efdadd6b1053cedd5c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ScottRBK
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5910c625e020a42bcc2ad0efdadd6b1053cedd5c -
Trigger Event:
push
-
Statement type: