Skip to content

feat: add /doctor command to diagnose local environment and dependencies - #1154

Closed
MukeshVermaLegit wants to merge 9051 commits into
CodebuffAI:mainfrom
MukeshVermaLegit:main
Closed

feat: add /doctor command to diagnose local environment and dependencies#1154
MukeshVermaLegit wants to merge 9051 commits into
CodebuffAI:mainfrom
MukeshVermaLegit:main

Conversation

@MukeshVermaLegit

@MukeshVermaLegit MukeshVermaLegit commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Adds a new /doctor slash command that helps users diagnose common issues with their local environment.

Closes #1119

Changes

  • New file: cli/src/commands/doctor.ts - Core diagnostic logic
  • New file: cli/src/commands/__tests__/doctor.test.ts - Unit tests
  • Modified: cli/src/commands/command-registry.ts - Register the command
  • Modified: cli/src/data/slash-commands.ts - Add command to slash menu

What it checks

The /doctor command (also invokable as /check or /health) checks:

  1. Platform and runtime - Shows OS, architecture, and Node.js/Bun version
  2. ripgrep (rg) - Required for code search functionality
  3. Git - Availability and repository status
  4. API connectivity - Tests connection to the backend
  5. tmux - Optional but recommended for multiplexing

Example output

Success case:

### Codebuff doctor

✅ All checks passed!

✅ **platform**: linux x64
✅ **runtime**: Bun 1.4.0
✅ **ripgrep (rg)**: Available
✅ **git**: Available
✅ **git repository**: Current directory is a git repository
✅ **tmux**: Available
✅ **API connectivity**: Connected to https://codebuff.com

With issues:

### Codebuff doctor

❌ 1 error(s), 1 warning(s) found

✅ **platform**: linux x64
✅ **runtime**: Bun 1.4.0
❌ **ripgrep (rg)**: ripgrep not found in PATH
   Install it:
     - macOS: brew install ripgrep
     - Ubuntu/Debian: sudo apt install ripgrep
✅ **git**: Available
⚠️ **tmux**: tmux not found
   tmux is optional but recommended for multiplexing...
✅ **API connectivity**: Connected to https://codebuff.com

### Recommendations

Fix the errors above to ensure full functionality.

Testing

All 7 tests pass (6 new tests for doctor command + 1 existing diagnostics test).

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:needs-work Right idea, not mergeable as written

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add /doctor command to diagnose local environment and dependencies

3 participants