Skip to content

Add health check command to CLI for environment diagnostics#67

Merged
shreyasmene06 merged 3 commits intoshreyasmene06:mainfrom
saksham-stack:feat/doctor-command
Feb 8, 2026
Merged

Add health check command to CLI for environment diagnostics#67
shreyasmene06 merged 3 commits intoshreyasmene06:mainfrom
saksham-stack:feat/doctor-command

Conversation

@saksham-stack
Copy link
Contributor

This PR introduces the doctor command to help users troubleshoot their environment. It performs the following checks:

Tool Verification: Checks for pyenv or mise in the system PATH.

Network Reachability: Verifies connectivity to python.org.

Permissions: Ensures the user has write access to the home directory for configuration and updates.

Testing:

• Ran pyvm doctor on [Your OS - e.g., Windows 11/Ubuntu].

• Verified that it correctly identifies missing network or missing tools.

@shreyasmene06 shreyasmene06 linked an issue Feb 6, 2026 that may be closed by this pull request
Copy link
Owner

@shreyasmene06 shreyasmene06 left a comment

Choose a reason for hiding this comment

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

This is exactly how the doctor command should be implemented - clean, simple, and properly integrated with the existing codebase. Great work!

  • Single file change to existing cli.py
  • Clean, readable implementation
  • Good user feedback with colored output
  • Checks all three requirements (tools, network, permissions)
  • Single, well-described commit

Minor suggestions (non-blocking)

  1. Add blank line before decorator (PEP 8 style):
        sys.exit(1)
@cli.command()  # <-- Add one more blank line above (should be 2 between functions)
def doctor():
  1. Consider adding a simple test (optional, can be done in a follow-up):
def test_doctor_command(runner):
    result = runner.invoke(cli, ["doctor"])
    assert result.exit_code == 0
    assert "health check" in result.output.lower()

These are all minor - the implementation is solid. LGTM! 🎉

just make sure the workflow checks are passed too you can try them locally, check contributing.md

@saksham-stack
Copy link
Contributor Author

I've changed what you requested please revies it once more. @shreyasmene06

@shreyasmene06
Copy link
Owner

Merged manually after resolving conflicts. The doctor command has been added to main.

@shreyasmene06 shreyasmene06 merged commit 24f4fb2 into shreyasmene06:main Feb 8, 2026
11 checks passed
@shreyasmene06 shreyasmene06 added acwoc Indicates this pull request is a part of AcWoC easy Denotes an easy and quick task DSCWoC Indicates that the project is a part of DSCWoC labels Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acwoc Indicates this pull request is a part of AcWoC DSCWoC Indicates that the project is a part of DSCWoC easy Denotes an easy and quick task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pyvm doctor command

2 participants