Building with Cursor, Claude, or ChatGPT? polyscan performs structural analysis to keep your codebase maintainable: one command scores your whole codebase and shows what to fix first.
Quick Start
No installation needed — one command runs the full analysis for JavaScript, TypeScript, Go, Rust, C++ and Java:
npx polyscan analyze .
The language of each file is detected from its extension, and everything lands in one report with one health score.
Demo Report
What You Get
Every analyzer scores your codebase (0-100 with an A-F grade) and generates an HTML report that shows what to fix first, looking at your code from five angles:
🧹 Dead code - unreachable code you can safely delete
📋 Duplicate code - copy-pasted and structurally similar code worth merging (Type 1-4 clone detection)
🌀 Complexity - functions that are hard to read and test
🏗️ Dependencies - circular imports and unstable module dependencies
🧩 Class design - classes that do too much or depend on too much (CBO coupling, LCOM cohesion)
Built with Go + tree-sitter — fast enough to run on every commit.
Language Support
Language
Extensions
Complexity
Duplicate code
Dead code
Dependencies
Class design
Tool
JavaScript / TypeScript
.js.jsx.mjs.cjs.ts.tsx.mts.cts
✅
✅
✅
✅
✅ CBO
polyscan
Python
.py
✅
✅
✅
✅
✅ CBO, LCOM
pyscn
Go
.go
✅
✅
—
✅
✅ CBO, LCOM
polyscan
Rust
.rs
✅
✅
—
—
✅ CBO, LCOM
polyscan
C++
.cpp.cc.cxx.hpp.hh.hxx.h.ipp.inl
✅
✅
—
—
—
polyscan
Java
.java
✅
✅
—
✅
✅ CBO, LCOM
polyscan
Complexity and duplicate code cover every language. Dependencies cover Go, Java, JavaScript/TypeScript and Python. For Go the nodes are packages, resolved through go.mod. For Java they are the packages that the package declarations name, and an import adds an edge when it leads to a type that the tree declares. Class design covers coupling (CBO) for Go, Rust, Java, JavaScript/TypeScript and Python and cohesion (LCOM4) for Python, Go, Rust and Java. For Go, Rust and Java, coupling counts the types of the analyzed tree that a type refers to from its declaration and methods, so the standard library and other modules do not count; a Go type is measured over the methods of its package, a Rust type over the methods of its impl blocks in a file, and a Java type over its own declaration, with a name resolved through the imports and the package of its file. Dead code needs the file-level import graph that only the JavaScript/TypeScript and Python backends build today. A dimension a language does not have is left out of its score rather than counted as clean, so scores stay comparable across languages.
Polyscan for GitHub
Polyscan App files a weekly audit report as a GitHub Issue. Free for every repository.
AI Agent Integration
The analyzers ship Agent Skills that teach AI coding agents when and how to run each analysis: health checks, refactoring, architecture review, and CI-friendly reports.