Find circular dependencies in TypeScript — every cycle, named
An import cycle is the one defect a code review structurally cannot catch: every file in the loop looks correct on its own, and the bug only exists between them. Symptoms show up far from the cause — an undefined where a class should be, an initialization order that works in dev and dies in the bundle, a refactor that breaks a module nobody touched.
prism0x2A builds the full import graph of your repository — locally, on your machine — and lists every cycle it finds with the files that form it. Not a warning count: the actual loop, file by file, so you can decide where to cut it.
Why cycles keep coming back
Barrel files re-exporting everything, types living next to implementations, two modules that each need one constant from the other — cycles grow out of ordinary, reasonable edits. AI-assisted editing accelerates it: a generated change resolves its imports from whatever exists, and the loop closes silently. Understanding AI-generated code is largely the art of catching exactly this class of defect early.
What the scan gives you
- Every cycle in the repository, with the exact member files — no sampling, no cap.
- The dependency graph around each loop, so you see which edge is the odd one out.
- A re-scan after the fix that proves the loop is gone, instead of assuming it.
The honest part
Some cycles are benign — a type-only loop that your bundler erases costs you nothing. prism0x2A shows you the loop and its members; whether it is worth breaking is a judgement about your architecture, and that stays yours. The metrics behind the graph are published — recompute them if you doubt them.