doctor
Run six health checks on a BackGen project covering runtime, configuration, database, dependencies, file integrity, and ownership. Uses --fix to auto-resolve missing manifest entries and ownership issues.
Instructions
Runs 6 health check categories against a BackGen-generated project and returns a structured pass/fail report for each one. (1) Runtime — Node version >= 18, npm availability. (2) Configuration — .env exists, DATABASE_URL is set, all required env vars from installed plugins are present. (3) Database — Prisma schema / Drizzle config / Mongoose connection string is reachable. (4) Dependencies — package.json deps match installed node_modules, no missing peer deps. (5) File integrity — every file tracked in .backgenrc.json exists on disk with the correct ownership classification (framework vs user). (6) Ownership — all files are properly classified as framework/shared/user, no orphaned plugins. Run this tool BEFORE telling the user that a project is ready to use. Use --fix to auto-resolve missing manifest entries and file ownership issues.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fix | No | Auto-fix issues where possible. When true, doctor will regenerate missing manifest entries, fix ownership classifications, and restore tracked files that are missing from disk. Safe to enable — never touches user-owned files (only framework and shared files). | |
| dir | No | Absolute or relative path to the BackGen-generated project to diagnose. Defaults to the current working directory. Example: '/home/user/projects/my-api'. |