// Developer Tools & Infrastructure•2026•VerifiedOpen Source

DevDoctor

Zero-Config Local Project Setup Scanner & CLI Diagnostics

// FIGURE 01SYSTEM INTERFACE SPECIMEN
DevDoctor system interface
DevDoctor // Zero-Config Local Project Setup Scanner & CLI Diagnostics

Project at a Glance

  • Problem: Developer onboarding often stalls with "Why won't this project run on my machine?" due to mismatched runtime versions, missing .env keys, conflicting lockfiles, occupied ports, or stale README instructions rather than broken application code.
  • Deliverables: A zero-config, local-first TypeScript + Node.js CLI (v0.1.0) with a modular stack scanner architecture: 9 deep JavaScript/Node.js/Bun diagnostic checkers, 4 basic ecosystem detectors (Docker, Go, PHP, Deno), a weighted 0-100 scoring engine, and Terminal, JSON, and Markdown reporters.
  • Core Stack: TypeScript 5, Node.js (ESM), Commander, Ora.
  • Practical Value: Built solo in 2026 as an open-source developer-experience tool on GitHub, designed to be read-only, evidence-based, and strictly privacy-conscious (never leaking .env secret values into reports).

Project Overview

DevDoctor is a zero-config local project setup scanner designed to act like a calm senior engineer helping a teammate diagnose onboarding blockers. Running devdoctor scan inspects the local project directory without requiring a configuration file, detects the project ecosystem, runs targeted read-only checks, calculates per-stack and overall health scores, and produces actionable suggestions backed by concrete evidence.

Every check is engineered around two core safety invariants:

  1. Read-Only & Safe by Default: DevDoctor diagnoses issues and recommends next steps; it does not auto-install packages, kill running processes, or mutate user project files beyond writing report outputs.
  2. Privacy-Conscious Reporting: Environment variable checks inspect .env.example, .env, and source usage, but reports only record variable names and presence status (missing vs present), never secret values.

Modular Scanner Architecture

+-------------------------------------------------------------+
|                   DEVDOCTOR CLI (Commander + Ora)           |
|      devdoctor scan [--output | --markdown | --json]        |
+------------------------------+------------------------------+
                               |
                               v
+-------------------------------------------------------------+
|                 CORE ENGINE (src/core/)                     |
|  detector.ts -> scanner.ts -> diagnosis.ts -> scoring.ts    |
+--------------+-------------------------------+--------------+
               |                               |
               v                               v
+-----------------------------+ +-----------------------------+
|   DEEP STACK MODULE (js)    | |   BASIC DETECTORS (4)       |
|  - runtimeVersion           | |  - docker (Dockerfile /     |
|  - packageManager           | |    docker-compose)          |
|  - dependencyInstalled      | |  - go (go.mod / go.sum)     |
|  - envExample & envUsage    | |  - php (composer / artisan) |
|  - portConflict             | |  - deno (deno.json / lock)  |
|  - readmeMismatch           | |  (includedInOverall: false) |
|  - scripts & workspace      | |                             |
+--------------+--------------+ +--------------+--------------+
               |                               |
               +---------------+---------------+
                               |
                               v
+-------------------------------------------------------------+
|                  REPORTERS (src/core/reporters/)            |
|   Terminal Summary   |  .devdoctor/report.json  |  Markdown |
+-------------------------------------------------------------+

Implemented Diagnostic Capabilities (v0.1.0)

1. Deep JavaScript / Node.js / Bun Checkers

Located under src/core/modules/js/checkers/, the primary module performs nine focused checks:

  • Runtime Version (runtimeVersion.ts): Compares local runtime versions against project version constraints using semver checks.
  • Package Manager & Lockfiles (packageManager.ts): Infers bun, yarn, pnpm, or npm from lockfiles and flags multiple conflicting lockfiles as a warning.
  • Dependency Installation (dependencyInstalled.ts): Verifies whether local dependencies are installed cleanly.
  • Environment Variable Coverage (envExample.ts & envUsage.ts): Cross-checks .env.example against .env and scans source code references without ever persisting secret values.
  • Port Conflict Detection (portConflict.ts): Checks whether expected local development ports are already occupied.
  • README & Scripts Validation (readmeMismatch.ts & scripts.ts): Inspects package.json scripts and surfaces mismatches against documented setup commands.
  • Monorepo / Workspace Detection (workspace.ts): Detects package.json workspaces and pnpm-workspace.yaml safely as informational guidance without unfairly penalizing the score.

2. Extensible Multi-Ecosystem Detection

Basic detection modules (docker, go, php, deno) inspect standard manifests (Dockerfile, docker-compose.yml, go.mod, composer.json, artisan, deno.json) and local tool binaries. Basic-only modules set includedInOverall: false so incomplete ecosystems do not distort the project's overall health score.

3. Weighted Scoring & Multi-Format Reporting

  • Scoring Engine (scoring.ts): Starts each eligible stack at 100 and applies severity-weighted penalties (failed high -25, failed medium -15, failed low -8, warning high -12, warning medium -8, warning low -3), classifying projects into healthy (85-100), warning (60-84), or critical (0-59).
  • Reporters (reporters/): Renders a compact terminal summary with ora progress states, writes .devdoctor/report.json by default, and supports --output <path>, --markdown <path>, and --json stdout streaming.

Sample CLI Report Format

DevDoctor report

Project: my-app
Stacks: js, docker
Overall score: 76/100 (warning)

JS score: 68/100 (warning)
Docker score: 90/100 (healthy)

Failed:
  x Node version mismatch
  x Missing env variables: DATABASE_URL, JWT_SECRET

Warnings:
  ! Multiple lockfiles detected
  ! Port 3000 is already in use

Info:
  i Workspace detected, deep workspace scanning is not supported yet

Report written to:
  .devdoctor/report.json

Current Status & Roadmap

  • Implemented (v0.1.0 on GitHub): Modular CLI scanner, 9 deep JS/Node/Bun checkers, 4 basic stack detectors, weighted scoring engine, and Terminal/JSON/Markdown reporters. Currently available as open-source code on GitHub (not yet published to the npm registry).
  • Planned / In Progress: The static read-only web dashboard (src/dashboard/ is currently a placeholder), deeper diagnostics for Go/PHP/Docker Compose, deep monorepo workspace scanning, and npm registry distribution.