Skip to content

Comments

feat(cli): add ao doctor command and Node.js version guard in ao init#133

Open
AgentWrapper wants to merge 1 commit intomainfrom
feat/15
Open

feat(cli): add ao doctor command and Node.js version guard in ao init#133
AgentWrapper wants to merge 1 commit intomainfrom
feat/15

Conversation

@AgentWrapper
Copy link
Collaborator

Summary

Implements the prerequisite checking and health-check parts of the end-to-end install & setup experience (#15).

  • ao doctor — new command that runs a comprehensive system health check before you start using ao:

    • Node.js version (≥ 20 required)
    • Git availability
    • Git repository detection
    • tmux availability (required for default runtime)
    • GitHub CLI presence and auth status
    • Agent CLI availability (claude-code, codex, aider — warns if none found)
    • Config file discovery and Zod validation
    • Write permissions for dataDir (~/.agent-orchestrator) and worktreeDir (~/.worktrees)
    • Optional integrations (LINEAR_API_KEY, SLACK_WEBHOOK_URL)
    • Each check shows ✓ / ⚠ / ✗ with an actionable fix instruction
    • Exits with non-zero if any critical checks fail
  • ao init Node.js guard — fails fast with a clear message if the user is running Node < 20, before any interactive prompts

Test plan

  • Run ao doctor in a repo with all dependencies installed — all checks green
  • Run ao doctor without tmux — shows ✗ with install instructions
  • Run ao doctor without a config file — shows warning with ao init suggestion
  • Run ao doctor with an invalid config — shows ✗ on config validation
  • ao init on Node 18 exits with clear error message
  • pnpm build and pnpm lint pass (verified locally)

Closes #15 (partial — implements prerequisite checks and ao doctor; npm publish and README quickstart are separate)

🤖 Generated with Claude Code

Implements the prerequisite checking part of the end-to-end setup
experience (issue #15):

- Add `ao doctor` command that checks: Node.js version (>=20), git,
  tmux, GitHub CLI + auth, agent CLIs (claude/codex/aider), config
  file validity, and directory write permissions. Exits non-zero if
  critical checks fail, with actionable fix instructions for each.
- Add Node.js version guard in `ao init` — fails fast with a clear
  message if running on Node < 20.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

}

return results;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No warning when Slack webhook missing

Medium Severity

checkOptionalIntegrations() only reports SLACK_WEBHOOK_URL when it is set and emits no warn entry when it is missing, so ao doctor can claim all optional integrations are fine while silently skipping Slack. This contradicts the command’s stated purpose of checking optional integrations.

Fix in Cursor Fix in Web

}

return results;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing “no agent found” warning

Medium Severity

checkAgentCli() computes hasAnyAgent but never emits a summary warn when none of claude, codex, or aider are present, despite the feature intent to warn if no agent CLI is available. The output can misleadingly look “fine” aside from the claude-code plugin-specific warning.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design and implement end-to-end install & setup experience

1 participant