Add health check command to CLI for environment diagnostics#67
Merged
shreyasmene06 merged 3 commits intoshreyasmene06:mainfrom Feb 8, 2026
Merged
Conversation
Closed
shreyasmene06
requested changes
Feb 6, 2026
Owner
shreyasmene06
left a comment
There was a problem hiding this comment.
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)
- 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():- 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
Contributor
Author
|
I've changed what you requested please revies it once more. @shreyasmene06 |
Owner
|
Merged manually after resolving conflicts. The doctor command has been added to main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.