Developer Doctor Command
Problem
New contributors and even experienced developers frequently debug setup issues manually: wrong bun version, daemon not running, port conflict, stale migrations, missing native module build. There is no single command that validates the local development environment and reports what needs fixing.
Goals
- One command checks all prerequisites and reports pass/fail for each.
- Output is human-readable with actionable fix suggestions.
- Runs without requiring a working build (checks prerequisites for building).
Non-goals
- Auto-fixing issues (doctor reports, human fixes).
- Replacing CI checks (this is a local development tool).
Proposed approach
Command: signet doctor (via CLI package) and bun run doctor
(via root package.json script pointing to scripts/doctor.ts). Both
entry points call the same check runner.
Check modules (each returns { name, status, message }):
- bun version: Verify bun >= 1.1. Parse
bun --version. - node version: Verify node >= 20 if present (some packages target node).
- dependencies installed: Check
node_modules/exists andbun install --frozen-lockfilewould succeed. - build artifacts: Verify core, connector-base, and daemon have built dist/ directories.
- daemon running: HTTP GET to
http://127.0.0.1:3850/health. Report running/stopped/port-conflict. - SQLite OK: Open the memory database, run a simple query. Report corruption or missing file.
- migrations current: Compare applied migration count against
available migration files in
packages/core/src/migrations/. - disk space: Check available space on the partition containing
$SIGNET_WORKSPACE. Warn if < 1GB. - port available: If daemon is not running, check that port 3850 is not occupied by another process.
- git remote: Verify a git remote is configured for
$SIGNET_WORKSPACEif git sync is enabled.
Output format: Each check prints a status line:
[PASS] bun version 1.1.45, [FAIL] daemon not running -- run: signet start,
[WARN] disk space low (800MB free). Exit code is non-zero if any
check fails.
Phases
Phase 1 — Core checks
- Implement check runner and checks 1-7.
- Add
signet doctorcommand to CLI package. - Add
bun run doctorscript to root package.json.
Phase 2 — Environment checks and polish
- Add checks 8-10 (disk, port, git remote).
- Add
--jsonflag for machine-readable output. - Add
--fixflag that runs safe auto-fixes (bun install, build).
Validation criteria
- Running
signet doctorwith daemon stopped reports the daemon check as FAIL with a fix suggestion. - Running with all prerequisites met reports all PASS and exits 0.
- Missing bun reports FAIL with minimum version requirement.
Open decisions
- Should
--fixauto-runbun installandbun run build, or just print the commands to run?