Oxcruise
Oxcruise checks the module graph of a JavaScript or TypeScript project and draws it. It is an alternative to dependency-cruiser. It uses the oxc toolchain.
Run it in your project:
npx oxcruise srcWhen a rule finds a violation, Oxcruise shows the source line, the dependency and the rule.
This output is from the tests/fixtures/monorepo fixture of the repository:
error[circular-dependencies]: circular dependency: packages/app/src/cycle-a.ts → packages/app/src/cycle-b.ts → packages/app/src/cycle-a.ts
--> packages/app/src/cycle-a.ts:1:19
|
1 | import { b } from "./cycle-b";
| ^^^^^^^^^^^
= cycle:
╭─▶ packages/app/src/cycle-a.ts
╰── packages/app/src/cycle-b.ts
✖ 10 problems (7 errors, 3 warnings) in 21 modules, 24 dependencies
1 suppressed by commentsWhy use Oxcruise
- Fast. Oxcruise reads, parses, extracts and resolves files in parallel on every core. It searches for cycles in each group of modules that import each other.
- One parser. It supports TS, TSX, MTS, CTS, JSX, Vue, Svelte and Astro. It knows exactly which imports are type-only. You do not install
typescript. - Monorepo aware. Each module uses its nearest
tsconfig.json. Oxcruise finds workspace packages and#imports. - Good defaults. Rules are in categories. The
correctnesscategory is on aserror, and thesuspiciouscategory is on aswarn. - A small config. A glob is the only pattern language. A
forbidrule says what you mean, with{name}captures and!negation. - Plugins in TypeScript. A plugin sees the finished graph. A plugin can also add a reporter.
- Unused code. Rules find unused exports, dependencies and files, as Knip does.
- A migration path. The
oxcruise --migratecommand converts a dependency-cruiser config file.
Where to go next
- New to Oxcruise? Start with the Quickstart.
- To change the rules, read Configuration and Rules and categories.
- To run Oxcruise in CI, read CI and other setup.
- To move from dependency-cruiser, read Migrate from dependency-cruiser.
- For every flag, key and rule, see the CLI, config and rules references.

