wt

wt doctor

Diagnose setup issues with a pass/warn/fail checklist.

Synopsis

wt doctor [path]

Description

wt doctor runs a diagnostic checklist on a worktree or the current directory and prints pass/warn/fail for each item. Use it to quickly identify why setup is failing or why the wrong package manager was detected.

Arguments

ArgumentDescription
[path]Directory to diagnose (default: current directory)

Checks Performed

  • git version ≥ 2.5
  • .worktreerc TOML syntax is valid (if present)
  • .gitignore covers .env files
  • Required package managers are on PATH (bun, uv, npm, etc.)
  • .env files referenced in env.patterns exist in the main worktree
  • Symlinks in the worktree are not broken
  • node_modules / .venv are present when expected

Examples

wt doctor                            # check current directory
wt doctor ../myapp-feat-billing      # check a specific worktree

Output Format

  [ ok ]  git version >= 2.5 (worktree support)
           git version 2.47.1
  [warn]  .env file: .env.local
           Not found in main worktree
           fix: Create the file or remove it from env.patterns
  [ ok ]  node_modules present

Exit Codes

CodeMeaning
0All checks passed
1One or more failures
2Warnings only

On this page