Check project health
forgeloop doctor validates that your project matches what ForgeLoop expects: config consistency, generated files, environment variables, dependencies, and (for modular/advanced bots) whether application command modules load the same way as forgeloop commands list.
When to run it
- After cloning or copying a bot repo (before first
npm install). - After deleting generated files by hand.
- Before opening a support issue (attach
--jsonoutput). - In CI with
--strictif you want warnings (for example missingnode_modules) to fail the build.
Example (human output)
bash
npx forgeloop doctor
┌──────────────────────────────────────────────┐│ ForgeLoop doctor │└──────────────────────────────────────────────┘Inspecting …/my-botProject• Name my-bot• Preset modular• Language ts• Package manager npm• Config forgeloop.config.mjsSummary• Duration …ms• Errors 0• Warnings 0✓ Project looks healthy.
Findings are grouped (Config, Structure, Environment, Dependencies, Discord command loading, …). Each problem includes suggested fixes.
Bootstrap .env
If you have .env.example but no .env:
forgeloop doctor --fix
This copies .env.example to .env; you still need to fill in real secrets.
CI patterns
Strict mode (fail on warnings too):
npx forgeloop doctor --dir . --strict
Machine-readable report:
npx forgeloop doctor --dir . --json > doctor-report.json
Subset of checks (faster or narrower gates):
npx forgeloop doctor --dir . --checks config,structure,env
Optional network/tooling checks:
npx forgeloop doctor --dir . --checks network,tooling
To run the defaults plus those optional groups, pass the full list:
npx forgeloop doctor --dir . --checks config,structure,env,deps,discord,network,tooling
See also: forgeloop doctor.