What is nestjs-doctor?
nestjs-doctor scans a NestJS codebase and reports findings across security, correctness, architecture, performance, and schema, then scores it 0-100.
Run it from a project root:
npx nestjs-doctor@latest .Install the CI workflow to review every pull request:
npx nestjs-doctor@latest ci installWhat you get
- Score: weighted by severity and category, normalized by project size, so it means the same thing next month as it does today.
- Findings: each carries a file, a line, and a rule id you can suppress or configure. Schema findings name an entity instead of a line.
- Report: the module graph, traced endpoints, the schema ER diagram, and a boot trace.
- Pull request reviewer: comments only on what the change introduced.
No AI at scan time
The rules are static analysis over the TypeScript AST. No model calls, and nothing about your code leaves the machine. The same commit scores the same on your laptop and in CI, which is what makes it usable as a gate.
How it fits with ESLint
A lint rule is handed one file. nestjs-doctor is handed the application, so module cycles, unused providers and the ORM schema show up here and not there. NestJS Doctor vs ESLint plugins compares them rule for rule.