Search docs

CLI reference

spawn doctor

Check project conventions and optionally create missing files.

spawn doctor#

Scores the current directory (or a given path) for project health. All checks are filesystem-based — nothing is executed or sent over the network.

Contract

  • Arguments: [PATH], default ..
  • Options: --fix, --dry-run, --yes / -y, --license TEXT; all off/unset by default, and the last three only apply with --fix.
  • Success: prints the health report (score out of 135, rating, recommendations). Exits code 0 when the project health rating is Fair, Good, or Excellent (≥ 50%).
  • Failure: a path that does not exist or is not a directory prints ❌ message, exit code 1. A project whose health rating is 'Needs Attention' (< 50%) exits code 1 (providing an automated gate for CI workflows). Declining the --fix confirmation exits 130.
  • Filesystem: plain spawn doctor is read-only. spawn doctor --fix only creates missing files and config; it never overwrites and never installs packages. --fix --dry-run writes nothing.
bash
spawn doctor
spawn doctor ./path/to/project

Remediation with --fix#

spawn doctor --fix scans the project and automatically creates missing standard files and configuration.

bash
# Automatically create missing files and config
spawn doctor --fix
spawn doctor ./path/to/project --fix

# Preview what would change without writing to disk
spawn doctor --fix --dry-run

# Run non-interactively without the confirmation prompt
spawn doctor --fix --yes

# Also add an MIT license if missing
spawn doctor --fix --license mit

Doctor flags

Flag Default Description
path . Path to the project directory to check
--fix false Create missing files and config. Never overwrites, never installs packages
--dry-run false With --fix: show what would change without writing
--yes / -y false With --fix: skip the confirmation prompt
--license — With --fix: also add a LICENSE (mit)

Guarantees

  • Never overwrites: If a file or configuration already exists, doctor --fix never touches or replaces it. Only missing items are created.
  • Never installs packages: doctor --fix will write standard configuration (such as ruff.toml, [tool.mypy], or .pre-commit-config.yaml), but will never run package managers or install dependencies into your environment. Instead, it prints helpful uv add --dev ... commands so you remain in control.

All checks

Check Category Weight
README.md Documentation 10
AGENTS.md Documentation 5
LICENSE Documentation 5
CHANGELOG.md Documentation 5
Git repository Version Control 15
.gitignore Version Control 10
Tests directory Testing 15
Pytest configured Testing 10
pyproject.toml Configuration 10
.env.example Configuration 5
Ruff configured Code Quality 10
Type checker Code Quality 10
Pre-commit Code Quality 5
Dockerfile Automation 10
GitHub Actions Automation 10

Max score: 135

Score tiers

Score Label
≥ 90% Excellent
70–89% Good
50–69% Fair
< 50% Needs Attention
ESC