Skip to content

feat: add daft doctor diagnostic command#169

Merged
avihut merged 1 commit intomasterfrom
daft-150/doctor
Feb 5, 2026
Merged

feat: add daft doctor diagnostic command#169
avihut merged 1 commit intomasterfrom
daft-150/doctor

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Feb 5, 2026

Summary

  • Add daft doctor command that inspects daft installation, repository configuration, and hooks setup
  • Reports issues with colored status symbols (✓/!/✗/-) and actionable suggestions
  • 12 health checks across 3 categories: Installation (5), Repository (4), Hooks (3)
  • Supports --verbose (detailed output), --quiet (warnings only), and --fix (auto-fix)
  • Auto-fix can create missing symlinks, prune orphaned worktrees, configure fetch refspec, set remote HEAD, fix hook permissions, and rename deprecated hooks

Test plan

  • cargo fmt -- --check passes
  • cargo clippy -- -D warnings passes clean
  • just test-unit — 206 tests pass (17 new doctor tests)
  • just gen-man + just verify-man — man pages up to date
  • Manual: daft doctor outside a repo (installation checks only)
  • Manual: daft doctor inside a repo (all applicable checks)
  • Manual: daft doctor --verbose shows detailed per-check info
  • Manual: daft doctor --quiet only shows warnings/errors
  • Manual: daft doctor --help shows proper help text
  • daft --help includes doctor in command list

Fixes #150

🤖 Generated with Claude Code

Add a diagnostic utility that inspects daft installation, repository
configuration, and hooks setup — reporting issues with actionable
suggestions and optional auto-fix. Modeled after `flutter doctor`.

12 checks across 3 categories:

Installation (always run):
- daft binary in PATH
- Command symlinks (11 expected)
- git version
- Man pages installed
- Shell integration configured

Repository (inside a git repo):
- Worktree layout (bare vs regular)
- Worktree consistency (orphaned entries)
- Fetch refspec configured
- Remote HEAD set

Hooks (when .daft/hooks/ exists):
- Hook files executable
- Deprecated hook names
- Trust level

CLI flags: --verbose, --quiet, --fix

Fixes #150

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@avihut avihut added this to the v1.1.0 milestone Feb 5, 2026
@avihut avihut added the feat New feature label Feb 5, 2026
@avihut avihut self-assigned this Feb 5, 2026
@avihut avihut merged commit ed343b6 into master Feb 5, 2026
5 checks passed
@avihut avihut deleted the daft-150/doctor branch February 5, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

daft doctor

1 participant