Open source — Available on npm

Diagnose your code
before you ship.

One command. Five analyzers. One score.
Know exactly what's wrong — before your users do.

$ npx @sabahattink/codediag scan . Copy
codediag — Terminal
Stack: nestjs + typescript + prisma
Security: 92/100
Dependencies: 91/100
Testing: 82/100
Structure: 88/100

codediag — Diagnostic Report

Project: my-nestjs-app
Stack: nestjs + typescript + prisma
Score: B+ (87/100)

API Health ████████████████████ 78
Security ████████████████████ 92
Dependencies ████████████████████ 91
Testing ████████████████████ 82
Structure ████████████████████ 88

POST /users has no auth guard
src/users/users.controller.ts
→ Add @UseGuards(AuthGuard)

Rate limiting is not configured in runtime source
→ Configure a framework-appropriate rate limiter

Five analyzers.
Zero config.

codediag auto-detects Node.js, NestJS, Express, and Next.js projects, then applies framework-aware checks.

API

API Health

Inspects NestJS, Express, and Next.js APIs. Checks authentication, validation, documentation, error handling, and health routes.

{}

Security

Finds hardcoded secrets, unsafe .env tracking, open CORS, missing runtime Helmet or rate limiting, and weak password handling.

pkg

Dependencies

Runs the matching npm, pnpm, or Yarn audit, then checks lock files, deprecated packages, engine specs, and essential scripts.

tst

Testing

Measures line, statement, function, and branch coverage from Istanbul reports, with static test checks as a fallback.

src

Structure

Validates useful README content, inherited lint and format config, resolved TypeScript strict mode, NestJS feature modules, and environment templates.

fix

Review-first fixes

Turns findings into a prioritized checklist or a structured AI handoff. It never edits files or applies a recommendation without explicit approval.

VS

VS Code

Publishes findings to Problems and opens local reports, fix plans, and AI review prompts without leaving the editor.

One unified score.

Every analyzer contributes to a weighted total. Security counts most, because shipping vulnerable code is the worst bug.

A+
A
B+
B
C
D
F

Works in CI too.

Add one line to your pipeline. codediag exits with code 1 if the score drops below your threshold.

# GitHub Actions
- name: Code Diagnostics
  run: npx @sabahattink/codediag scan . --ci --threshold 80

# Reports and score badge
npx @sabahattink/codediag scan . --format json
npx @sabahattink/codediag scan . --format svg > codediag.svg
npx @sabahattink/codediag scan . --format html > codediag-report.html
npx @sabahattink/codediag scan . --format fixes > codediag-fixes.md
npx @sabahattink/codediag scan . --format prompt > codediag-prompt.txt

Ship with confidence.

npx @sabahattink/codediag scan .