Skip to main content

ReadMenator

image

A token-free, offline, production-grade polyglot codebase knowledge graph & architectural analyzer.

No LLMs. No tokens. No cloud costs. Pure static analysis via AST + regex.

ReadMenator builds production-grade codebase knowledge graphs and architectural health reports 100% offline. Identify structural risks, security flaws, and change impact patterns instantly across 19 languages.

https://github.com/user-attachments/assets/af02cae9-5cb5-427e-84cc-af4d82374116

Supported Languages (19)

C, C++, Python, Go, Rust, JavaScript, TypeScript, Java, C#, Shell, PHP, Dart, GDScript, Nim, Assembly, Ruby, Swift, Kotlin, Scala, Lua, Elixir.

What ReadMenator Does Better Than Graphify

Feature graphify readmenator
Extraction LLM agents (tokens) AST + regex (free)
Languages Any (LLM reads anything) 19 static parsers
Call graph edges No Yes (intra-file calls)
Inheritance edges No Yes (class, interface)
Architectural layers No Yes (5-layer detection)
Community detection Leiden/Louvain Label propagation
God nodes Yes Yes
Surprising connections Yes Yes
Suggested questions Yes Yes
Edge types 1 (imports) 4 (imports, calls, inherits, resolved_imports)
Export formats JSON, HTML, SVG, GraphML, Obsidian, Cypher/Neo4j JSON, HTML, SVG, GraphML, Obsidian
Watch mode Yes Yes (polling)
Incremental updates Cache-based SHA256 cache
Confidence-tagged edges EXTRACTED/INFERRED/AMBIGUOUS EXTRACTED
Cost Token-based Zero
Speed Minutes Seconds

Installation

pip install readmenator 

or install from path

pip install .

Usage

Generate knowledge base

python -m readmenator /path/to/project --rebuild

Creates KNOWLEDGE_BASE.md with Table of Contents, Statistics Dashboard, Architectural Layers, God Nodes, Community Analysis, Surprising Connections, Suggested Questions, UML Class Diagram, Mermaid graph (internal edges + community subgraphs), and Architecture Reference. A link to the knowledge base is automatically injected into the project's README.md.

Export formats

python -m readmenator /path/to/project --export-all                # JSON + HTML + SVG
python -m readmenator /path/to/project --json                      # graph.json (GraphRAG-ready)
python -m readmenator /path/to/project --html                      # graph.html (interactive vis.js)
python -m readmenator /path/to/project --svg                       # graph.svg (static)
python -m readmenator /path/to/project --graphml                   # graph.graphml (Gephi/yEd)
python -m readmenator /path/to/project obsidian                    # Obsidian vault (wikilinks)
python -m readmenator /path/to/project wiki                       # Agent wiki (index + community pages)
python -m readmenator /path/to/project lint-wiki                  # Wiki health check
python -m readmenator /path/to/project lint                        # Architecture violations (exit 1 on errors)
python -m readmenator /path/to/project strip-dead-code             # Orphaned symbol report
python -m readmenator /path/to/project generate-rules              # Generate .cursorrules file
python -m readmenator /path/to/project refactor-monolith           # Refactoring plans + executable scripts

Query, explain, and path trace

python -m readmenator /path/to/project query "What classes handle HTTP?"
python -m readmenator /path/to/project explain Database
python -m readmenator /path/to/project path SymbolA SymbolB

Analysis

python -m readmenator /path/to/project analyze          # community + god nodes + questions
python -m readmenator /path/to/project layers           # architectural layer detection

Advanced Architectural Insights (Out of the Box)

ReadMenator goes beyond simple visualization. It runs complex graph algorithms locally to give you deep insights into your code's health:

  • Change Impact Analysis: Know exactly which files are highly coupled. ReadMenator calculates direct and transitive dependents so you can predict what will break before you refactor.
  • Hotspot Detection: Automatically ranks files by combining cognitive complexity (symbol richness) and graph centrality to pinpoint technical debt.
  • Taint Propagation Mapping: Traces how risky imports (like subprocess or OS-level sinks) propagate transitively through your codebase dependency graph.
  • Community & Layer Detection: Automatically groups files into structural layers (utility, business logic, infrastructure) and highly cohesive communities using label propagation.

Automation

python -m readmenator /path/to/project update           # incremental (SHA256 cache)
python -m readmenator /path/to/project watch            # auto-rebuild on file changes
python -m readmenator /path/to/project analyze          # Analyze the proyect

Run tests

python -m readmenator --test

UML Class Diagram

ReadMenator auto-generates Mermaid classDiagram from parsed class-level symbols across all supported languages. UML diagrams are embedded in KNOWLEDGE_BASE.md by default.

python -m readmenator /path/to/project uml              # Print UML class diagram

Interactive System Maps

ReadMenator builds five interactive physics-driven diagrams from scanned topology and writes them to readmenator-maps/ on every run: architecture, workflow, sequence, dataflow, and lifecycle. Each file is a vis.js network with draggable nodes, live physics, search, focus passport with full file documentation, upstream/downstream reach, directed route probing, role comparison, guided chapters, dark/light themes, keyboard shortcuts, hash deep links, and client-side PNG and JSON export. Cards state the primary scope honestly ("N of M files"); the full per-file listing lives in KNOWLEDGE_BASE.md.

python -m readmenator /path/to/project diagrams        # Export all 5 vis.js maps + gallery index (needs network)
python -m readmenator /path/to/project diagram sequence # Export one vis.js map (draggable nodes, live physics)
python -m readmenator /path/to/project pages           # Publish docs/ static site: gallery index + maps (GitHub Pages ready)

Maps are physics-driven vis.js documents (engine loaded from a CDN pinned in Config). Click any node for full file documentation: docstring, symbol table with signatures, and import neighborhoods.

Serve the docs/ directory directly with GitHub Pages (Settings -> Pages -> Deploy from branch -> folder docs/). The gallery index.html links every map with relative paths, works fully offline, and needs no build step. The site also ships llms.txt (the llms.txt convention), so agents browsing the published site get a plain-markdown map of the wiki, agent docs, and knowledge base instead of parsing HTML. Once docs/ holds a gallery, every --rebuild refreshes it (video and docs included).

Agent-Ready Output (zero tokens)

readmenator-agent/ is built for agents that grep and read:

  • MANIFEST.json records git_commit: compare it with git rev-parse HEAD to know whether the docs are stale before trusting them. It also lists every document with its line count and approximate token cost.
  • Every document stays under 500 lines. Larger ones are paged as NAME_p2.md, so grep with NAME*.md.
  • INDEX.md gives each file a one-sentence purpose and a "Used by" count (blast radius at a glance).
  • API.md lists one line per public function, and GOTCHAS.md ranks blast radius without counting tests.
  • readmenator never rescans its own generated output.

GitHub Wiki

Mirror the wiki, agent docs, recipes, and KNOWLEDGE_BASE.md into the repository's GitHub wiki. Pages get a sidebar, cross-links, and source permalinks pinned to the current commit:

readmenator . --rebuild                  # regenerates everything AND publishes the GitHub wiki
readmenator . gh-wiki                    # publish the wiki only
readmenator . gh-wiki --dry-run          # render pages into readmenator-ghwiki/ (no git calls)

Requirements: the wiki is enabled, its first page was created once in the web UI, and git can push (for example after gh auth setup-git). Pages written by hand are never deleted. Only pages that readmenator generated earlier are replaced.

Generate Class Stubs in Other Languages

Translate extracted class structures into target language declarations:

python -m readmenator /path/to/project --c++            # C++ class declarations
python -m readmenator /path/to/project --java           # Java class declarations
python -m readmenator /path/to/project --csharp         # C# class declarations
python -m readmenator /path/to/project --kotlin         # Kotlin class declarations
python -m readmenator /path/to/project --scala          # Scala class declarations
python -m readmenator /path/to/project --swift-classes  # Swift type declarations
python -m readmenator /path/to/project --dart-classes   # Dart class declarations
python -m readmenator /path/to/project --ruby-classes   # Ruby class declarations
python -m readmenator /path/to/project --go-classes     # Go type declarations
python -m readmenator /path/to/project --rust-classes   # Rust type declarations
python -m readmenator /path/to/project --php-classes    # PHP class declarations
python -m readmenator /path/to/project --python-classes # Python class declarations

Supported target languages (12): C++, Java, C#, Python, Go, Rust, PHP, Kotlin, Scala, Swift, Dart, Ruby.

Architecture

Contract File Responsibility
Config _config.py Immutable centralized configuration
Models _models.py Symbol, Node, Edge, AnalysisResult
Parsers parsers/ package 19 language parsers + factory (Strategy pattern)
Scanner _scanner.py Secure directory walking, file-level docs, progress
Resolver _resolver.py Import path resolution
Mermaid _mermaid.py Mermaid graph with internal edges and community subgraphs
UML Generator _uml.py Mermaid class diagrams + 12-language code generation
Documentation _documentation.py KNOWLEDGE_BASE.md with TOC, dashboard, layers, analysis, UML
Query _query.py Query/explain/path engine with bidirectional path finding
Analyzer _analyzer.py Communities, god nodes, surprising connections, questions
Cache _cache.py SHA256 content cache for incremental updates
Exporter _exporter.py JSON, HTML (vis.js), SVG, GraphML, Obsidian
Layers _layers.py Architectural layer detection (5-layer model)
Watcher _watcher.py Filesystem polling watcher for auto-rebuild
README Injector _readme_injector.py Auto-injects KB link into project README
Application _app.py Application orchestrator
CLI __main__.py CLI entry point and argument dispatch

Security

  • Symlinks rejected
  • File size capped at 10 MB
  • Directory depth limited to 20
  • No absolute paths in source code
  • No external network calls in any module
  • All exceptions silently caught during parsing

License

image

AGPL-3.0

Knowledge Base

This project has been analyzed by ReadMenator, a zero-token polyglot static analysis tool. Analysis outputs are available:

  • KNOWLEDGE_BASE.md -- Full architecture reference with all classes, functions, imports, dependency graphs, UML class diagrams, security audit findings, community analysis, and more.
  • readmenator-agent/ -- Agent-friendly, grep-optimized index.
    • INDEX.md -- Quick reference: what each file does
    • API.md -- Public function contracts
    • GOTCHAS.md -- Change warnings
    • SECURITY.md -- Findings by severity
  • readmenator-wiki/ -- Navigable wiki (start here for the big picture).
    • index.md -- Entry point: overview, reading order, god nodes, connections
    • community_*.md -- One synthesis page per code community
    • REPORT.md -- Honest audit: coverage, confidence, limits

AI agents: Read readmenator-wiki/index.md first for the big picture, then readmenator-agent/INDEX.md for grep-friendly lookup. Developers: Read KNOWLEDGE_BASE.md for full architecture reference.

Metadata

Release files for readmenator 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for readmenator 1.3.0
File Size Uploaded
readmenator-1.3.0.tar.gz 306.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for readmenator 1.3.0
File Interpreter ABI Platform
readmenator-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 578.8 kB

Release files / readmenator-1.3.0.tar.gz

Download URL readmenator-1.3.0.tar.gz
Size 306.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f127538623cdfaa7a7dd5dba2e6942708db60a7ee7223497ec99dcacbcf1e930
BLAKE2b-256 checksum
How to use checksums
9440807631229608a42519b6fef06a5692da7972bc9add2913ee0a9711b0f87f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / readmenator-1.3.0-py3-none-any.whl

Download URL readmenator-1.3.0-py3-none-any.whl
Size 272.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8a0603393f24c763cd4c712e6800711adbc732df018ad583a452bdc8601059e
BLAKE2b-256 checksum
How to use checksums
c50554c9103715bcf253f9e0c7d290c7712a8820eb0c877c6f58160938ae8d82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

This release

1.3.0 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page