Doctor Command
burger-api doctor validates your project structure and reports issues: a quick health check before you dig into a bug that might just be a missing file. Run it from your project root.
burger-api doctor
It checks, in order:
- Bun is 1.4.4 or newer (older versions miss the October 2026 security fixes): an older Bun is an error.
- When Node is installed, it is 24.22.1+ or 26.12.1+ (needed only for the
nodebuild target): an older Node is a warning. package.jsonexists.burger-apiis listed independencies/devDependenciesand resolves from the project. A listed but not installed package tells you to runbun install.- A build config (
burger.build.ts/.js, or the legacyburger.config.ts/.js): when found it must load, otherwise the check fails. When missing, the check is informational and convention defaults apply. src/index.ts(orsrc/index.js/src/index.mjs) exists.- API routes under the configured
apiDir: a missing defaultsrc/apiis informational (fine for pages-only apps), a missing custom directory is an error, and every discovered route and convention file must import without errors. tsconfig.json(orjsconfig.jsonfor JavaScript projects) exists.- No legacy
burger.config.ts/.jsleft over: the config file was renamed toburger.build.tsat some point; doctor flags the old name as an error if found. - The scan options in
src/index.*agree withburger.build.ts: a mismatch is a warning, not an error. src/hooks.ts,src/plugins.ts,src/providers.ts,src/openapi.config.ts: reported as found or not found, but never as errors (all are optional).
Exits 0 when every check passes, 1 otherwise, so it's safe to wire into a pre-commit hook or CI step alongside bun run typecheck.
--json
burger-api doctor --json
Emits a single structured, versioned JSON object ({ version: 1, ok, errorCount, checks: [{ name, pass, message }] }) instead of colored console lines; a check may also carry a severity (info or warning). The exit code behavior is unchanged either way. Meant for tooling/CI that wants to read individual check results rather than grep formatted text.