Skip to content

Enhancement: add --doctor CLI diagnostic flag#1770

Open
oscarpeer-design wants to merge 5 commits into
openinterpreter:mainfrom
oscarpeer-design:main
Open

Enhancement: add --doctor CLI diagnostic flag#1770
oscarpeer-design wants to merge 5 commits into
openinterpreter:mainfrom
oscarpeer-design:main

Conversation

@oscarpeer-design
Copy link
Copy Markdown

@oscarpeer-design oscarpeer-design commented May 28, 2026

Describe the changes you have made:

This PR introduces a --doctor CLI flag to the terminal interface, allowing users to run a full environment diagnostics check directly from the command line.

When invoked, the doctor system performs a sequence of runtime checks on the current environment using run_doctor(OpenInterpreter()), including:

  • Python runtime information
  • Required package availability
  • Environment variable configuration (API keys)
  • Model/provider resolution via LiteLLM
  • File system and shell execution permissions
  • Optional CUDA/GPU availability

How it runs:

When the CLI is executed with the --doctor flag
python -m interpreter.terminal_interface.start_terminal_interface --doctor

The terminal interface:

  • Parses CLI arguments on startup
  • Detects the --doctor flag
  • Instantiates a clean OpenInterpreter instance
  • Calls run_doctor(OpenInterpreter())
  • prints diagnostic results to stdout and exits after completion.

Behavioural verification:

  • Doctor runs end-to-end and prints full diagnostic report
  • CLI correctly triggers doctor execution when --doctor is provided
  • No changes to interpreter runtime behaviour outside CLI diagnostic mode

Reference any relevant issues (e.g. "Fixes #000"):

This feature was introduced as part of internal CLI tooling improvements and does not reference a tracked issue.

Pre-Submission Checklist (optional but appreciated):

  • I have included relevant documentation updates (stored in /docs)
  • I have read docs/CONTRIBUTING.md
  • I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • Tested on Windows (correctly outputs diagnosis based on user environment and installed models)
  • Tested on MacOS
  • Tested on Linux

@oscarpeer-design oscarpeer-design changed the title Implement --doctor CLI diagnostic flag Enhancement: add --doctor CLI diagnostic flag May 28, 2026
@endolith
Copy link
Copy Markdown
Contributor

This is for troubleshooting local LLMs?

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.

2 participants