codaviz¶
codaviz is a CLI that analyzes code complexity and emits a self-contained, interactive HTML report. It is a simpler, local alternative to SonarQube for spotting where to refactor.
Point it at a repo and it ranks complexity hotspots, draws a treemap (sized by lines of code, colored by a metric you pick), lets you inspect any module to read its functions and source, and flags circular imports and over-threshold functions.
codaviz needs no server and no database. The report is one HTML file you can open offline or email to a teammate.

In one command¶
What it does¶
- Hotspot ranking: modules and packages ordered by the metric you select, as a bar chart and a sortable table.
- Treemap: the package/module tree as nested tiles, sized by SLOC and colored by badness. Click to zoom. A depth control keeps deep trees readable.
- Function drill-down: every function with its cyclomatic and cognitive score, line number, and source snippet.
- Circular imports: detected statically, without executing any code.
- Threshold hints: functions over your configured cyclomatic or cognitive limits are flagged in place.
- Exports:
--format jsonor--format csvfor the raw entity data.
Languages¶
Python works with no extra dependencies. JavaScript/TypeScript, Go, Ruby, Rust, Java, and PHP are analyzed via tree-sitter behind an optional extra. A single report can mix languages. See Languages.
Where to go next¶
- Getting started: install it and produce your first report.
- Usage: the full CLI surface.
- Reading the report: what each panel means and how to navigate it.
- Metrics: how each number is computed, and by which library.
- Configuration: the
[tool.codaviz]table. - Writing a plugin: adding a language.
Non-goals¶
Security scanning (use Bandit), runtime profiling (use cProfile or scalene), and test coverage (use pytest-cov) are out of scope. codaviz focuses on structural complexity.
License¶
codaviz is licensed under the Apache License 2.0.