Skip to content

feat(cli): add /doctor command for environment and dependency diagnostics - #1120

Closed
nilaymallikk wants to merge 8801 commits into
CodebuffAI:mainfrom
nilaymallikk:feature/doctor-command
Closed

feat(cli): add /doctor command for environment and dependency diagnostics#1120
nilaymallikk wants to merge 8801 commits into
CodebuffAI:mainfrom
nilaymallikk:feature/doctor-command

Conversation

@nilaymallikk

Copy link
Copy Markdown

Summary

Closes #1119.

Adds a /doctor slash command (with aliases /health and /check) to the CLI that runs fast local diagnostics to verify that required tools and environment prerequisites are healthy:

  • Runtime & OS: Reports Bun/Node version and platform architecture.
  • Git: Validates git binary and whether the current directory is an active Git repo (with branch name).
  • Ripgrep (rg): Resolves the bundled ripgrep executable from @codebuff/sdk and verifies it executes properly (with fallback to system rg).
  • Tmux: Verifies tmux availability for detached sessions.
  • Network Connectivity: Fast reachability check to the configured API endpoint.

Scope

All changes are strictly scoped within cli/:

  • cli/src/commands/doctor.ts (new)
  • cli/src/commands/command-registry.ts
  • cli/src/data/slash-commands.ts
  • cli/src/commands/__tests__/doctor.test.ts (new unit tests)

Verification

  • Passed unit tests: bun test cli/src/commands/__tests__/doctor.test.ts
  • Passed full CI build and packaging: bun run ci
  • Passed binary smoke test: bun cli/scripts/smoke-binary.ts cli/bin/freebuff

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

Labels

bot:triaged Classified by the community triage bot pr:port-candidate Worth porting into the private source tree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add /doctor command to diagnose local environment and dependencies

3 participants