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

1

Run HezGene without installing

pipx run hezgene audit

No config needed for the first run.

2

Read the health report

Code quality, duplication, and complexity, in one pass.

3

Go deeper

hezgene evolve --generations 10
hezgene config --set llm.provider openai
hezgene audit --min-score 85
hezgene arena 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.

Most-used pages

Quick start
Configuration
CI integration
CLI reference
Installation
Install HezGene via pipx, uv, npm, or a direct...
Installation
Install via pipx, uv, or npm
Next