The Documentation
Technical specifications for the PyDoctor diagnostic kernel, automation hooks, and environment security protocols.
Introduction
PyDoctor is a developer-first CLI tool designed to analyze and diagnose the health of Python environments and projects.
PyDoctor acts as "The Doctor for Your Python Environment."
System Requirements
PyDoctor is designed to be **cross-platform, lightweight, and fast**. Ensure your environment meets the following minimum requirements.
Core Specs
- Python 3.9+
- OS macOS, Linux, Win
- Environment venv / virtualenv
- Manager pip
Supported Shells
Installation
Primary Install
The fastest way to install PyDoctor is through pip. Post-installation, the command is available globally.
pip install pydoctor-cliRecommended: pipx
For an isolated global CLI installation, utilizing pipx is the gold standard.
pipx install pydoctor-cliFrom Source
Quick Start
Navigate to any Python project node and initiate a full diagnostic kernel scan.
pydoctor diagnoseAutonomous Report Example
PyDoctor Environment Diagnosis ✔ Python Version: 3.11 ✔ Virtual Environment Active ✔ Installed Packages: 124 Dependency Analysis ⚠ 4 Outdated Packages Security Scan ✖ 1 Critical Vulnerability Unused Dependencies ⚠ 2 Unused Packages Diagnosis Complete
Environment Analysis
Internal heuristics audit the Python runtime to verify binary integrity and environment health.
pydoctor check-envCHECKS PERFORMED:
• Python version compatibility
• Active virtual environment status
• Binary PATH validity
Vulnerability Scanning
PyDoctor cross-references dependencies against global vulnerability databases (CVE/GHSA).
Urgent: Security Integrity Check
Critical vulnerabilities are automatically tiered into: LOW | MEDIUM | HIGH | CRITICAL.
pydoctor scan-securityPackage Managers
PyDoctor is engine-agnostic and provides native support for the most popular Python package managers. It automatically detects your project structure and tailors its diagnostic kernel accordingly.
pip
The standard
Poetry
Modern deps
PDM
Next-gen
uv
Extremely fast
CLI Commands
Master the PyDoctor CLI with these essential diagnostic flags and commands.
pydoctor diagnoseInitiate full project health scanpydoctor check-envVerify Python environment integritypydoctor scan-securityRun security vulnerability analysispydoctor list-depsDisplay deep dependency treepydoctor cleanIdentify and purge unused packagespydoctor check --ciDetect exposed secrets & CI riskspydoctor dockerDiagnose containers & Dockerfilespydoctor githubAudit repository & git configurationsDependency Analysis
PyDoctor builds a directed acyclic graph (DAG) of your dependencies to find conflicts and circular references.
pydoctor list-deps --treeGraph Logic
The kernel recursively resolves every sub-dependency to ensure version pin compatibility across your entire stack.
Pinning Engine
Automatically suggests optimal version ranges for your requirements.txt or pyproject.toml.
Advanced Health Scoring
The v2.0.0 engine introduces a multi-variable scoring algorithm that computes a project health score from 0 to 100.
PENALTY HEURISTICS
Dynamic Fix Suggestions
The 🚀 Next Steps terminal guide intelligently suggests remediation paths based on your current score. It automatically suppresses irrelevant noisy commands and self-optimizes once you achieve the perfect 100/100 health certificate.
Outdated Packages
Stay ahead of the curve. PyDoctor identifies packages with available upstream updates and major version jumps.
pydoctor check-updatesUnused Dependencies
Bloated environments are slow and insecure. Our heuristics find packages that are installed but never imported in your source code.
pydoctor find-unusedScanning Heuristics: Static Analysis + Import Tracking
Reporting Engine
Generate machine-readable assets for CI/CD pipelines and security audits.
pydoctor report --format jsonCI/CD Integration
Integrate PyDoctor into your GitHub Actions or GitLab CI to fail builds on critical vulnerabilities.
# .github/workflows/verify.yml
- name: PyDoctor Security Scan
run: pydoctor check --ci --exit-code
Configuration
PyDoctor can be configured globally using a `.pydoctorrc` or within your `pyproject.toml` file.
[tool.pydoctor] severity_threshold = "medium" exclude_packages = ["pytest", "black"] report_format = "json"
Contributing
PyDoctor is open-source. We welcome contributions to our diagnostic kernel and security heuristics.