Getting Started
HezGene documentation
Get started with HezGene: codebase intelligence for Python. Free static analysis for unused code, complexity reduction, and test generation. Optional LLM runtime intelligence for deep semantic optimizations and architecture guidance.
HezGene is codebase intelligence for Python.
Use the free deterministic AST layer to find unused code, duplication, and complexity hotspots across your module graph. Add the optional LLM layer when you want to execute deep semantic refactoring or let AI write guaranteed-safe tests using the 5-Ring Gauntlet.
Static intelligence (free)
MIT-licensed and open source. Understand how your code is wired.
LLM intelligence (optional)
Paid AI layer. Let Claude or OpenAI safely rewrite your modules.
Start here
Run HezGene without installing
pipxrun hezgene audit
No config needed for the first run.
Read the health report
Code quality, duplication, and complexity, in one pass.
Go deeper
hezgeneevolve --generations 10hezgeneconfig --set llm.provider openaihezgeneaudit --min-score 85hezgenearena run
What HezGene helps you do
Delete cold code
Remove unused files, exports, and dependencies with confidence.
Reduce duplication
Find repeated logic before it spreads.
Prioritize refactors
Use complexity and health analysis to focus cleanup work.
Add LLM evidence
See generated tests, semantics, and AI-backed safety evidence.
Pick your workflow
CLI
Best place to start. Works locally, in CI, and in agent loops.
VS Code
Real-time diagnostics, Code Lens, and one-click fixes in the editor.
MCP and agents
Structured tool calling for Claude Code, Cursor, and other agents.
Understand the two layers
Static analysis answers: what is connected to what?
LLM intelligence answers: what does it mean?
They meet in the hezgene arena.
Static vs LLM intelligence
Read the mental model before you set up API keys.