Skip to main content

PyDoctor CLI (Command Line Interface)

PyDoctor is a standalone, developer-friendly diagnostic assistant for Python environments. It acts like a personal physician for your code — scanning your project and environment to prescribe fixes for misconfigurations, dependencies, and security vulnerabilities.

CI Status PyPI version Python versions License


🧭 Navigation


Project Description

PyDoctor isn't just a scanner; it's a complete remediation tool that performs static analysis on your project files and cross-references your environment against live security databases.

Key Features

  • Environment Analysis: Detects missing virtualenvs, outdated pip, or deprecated Python versions.
  • Dependency Fix: Automatically resolves conflicts and installs missing packages.
  • Security: Integrates with OSV.dev API to check against known CVEs/GHSAs.
  • Unused Detection: Identifies declared packages that are never imported.
  • Multi-Manager: Intelligent support for pip, Poetry, uv, and pdm.
  • Rich UI: Beautiful progress spinners, icons, and color-coded severities.

📦 Installation

PyDoctor requires Python 3.10+. For the best experience, we recommend using pipx.

# Recommended: Install globally in an isolated environment
pipx install pydoctor-cli

# Standard pip installation
pip install pydoctor-cli

⚡ Usage

Full Diagnosis

Run a comprehensive check-up on your project.

pydoctor diagnose

Automated Fixes

Let PyDoctor perform the heavy lifting. It will offer to install missing packages, upgrade outdated ones, and clean up your environment.

pydoctor fix

Release History

v2.0.1

  • Security scans fail closed: if the OSV database can't be reached, pydoctor now reports SEC_SCAN_INCOMPLETE (error, exit 1) instead of a clean result.
  • No more double-counted advisories: advisories listed under several IDs (e.g. GHSA and PYSEC) are reported and scored once.

v2.0.0

  • 🚀 Major UI/UX Revamp: Introduced a premium "kernel/hacker" aesthetic with boxed reports, dynamic progress animations, and improved readability.
  • 🛡️ CI/CD Guard Mode: New pydoctor check --ci command to detect exposed secrets (AWS, GitHub, PyPI tokens) and insecure workflow patterns in GitHub Actions/GitLab CI.
  • 🐳 Docker Support: New pydoctor docker command to diagnose Python issues inside containers and audit Dockerfiles.
  • 🐙 GitHub Integration: New pydoctor github command for repository-wide health scans and local git configuration audits.
  • 📈 Advanced Health Scoring: Refined the 0-100 scoring algorithm with granular penalties for security vulnerabilities and CI/CD risks.
  • ⚡ Performance Boost: Parallel execution engine for scanning large codebases faster.
  • 🔍 Smart Environment Detection: Now automatically prompts users when no venv is found, preventing accidental system-wide changes.
  • 🎯 Context-Aware Reporting: Targeted commands (like pydoctor scan-unused or pydoctor github) now intelligently suppress unrelated scanner noise.
  • 🧠 OSV Deep-Fetching: Overcame upstream OSV API batch limits by implementing dynamic real-time fetching and caching of full vulnerability advisories natively.
  • 🔗 Transitive Dependency Tracking: PyDoctor now uniquely segregates mathematical/transitive dependencies from pure unused bloat, effectively preventing pydoctor fix from uninstalling required sub-packages.
  • 🛠️ Refined Git Discovery: Utilizes native git heuristics (--is-inside-work-tree & --show-toplevel) to flawlessly map out project roots and repository states, even when scanning from deeply nested sub-directories.
  • 🔮 Dynamic Fix Suggestions: The 🚀 Next Steps terminal guide now dynamically rules out the currently running command and gracefully self-hides when a project achieves a perfect 100/100 health rating.

v0.1.3

  • Enhanced Package Detection: Pydoctor now intelligently detects and uses your project's specific virtual environment (Poetry, UV, PDM, or standard venv) to run all scans and diagnoses.
  • Improved Architecture: Refactored core modules to reduce complexity and improve maintainability (resolved C901 linting errors).
  • Fix Rendering Errors: Resolved issues with undefined verbose detail renderers in the CLI.

v0.1.2

  • Maintenance: Minor internal fixes and linting improvements for CI/CD stability.
  • Professional Meta: Revamped pyproject.toml with complete author metadata and SEO keywords.

v0.1.1

  • Bug Fixes: Minor improvements to dependency scanning reliability.
  • Metadata Update: Initial professional README branding.

v0.1.0

  • Initial Release: Core diagnostic engine with support for Environment, Dependencies, Outdated Packages, Security, and Unused Package scans.
  • Remediation: Initial support for auto-fixing issues via pydoctor fix.

Verified Details


👥 Maintainers

📄 Meta

  • License: Apache License 2.0
  • Author: Favour Bamgboye
  • Requires: Python >=3.10
  • Classifiers:
    • Development Status :: 4 - Beta
    • Intended Audience :: Developers
    • License :: OSI Approved :: Apache Software License
    • Operating System :: OS Independent
    • Programming Language :: Python :: 3
    • Programming Language :: Python :: 3.10
    • Programming Language :: Python :: 3.11
    • Programming Language :: Python :: 3.12
    • Topic :: Software Development :: Quality Assurance

Developed with ❤️ by Favour Bamgboye

Metadata

Release files for pydoctor-cli 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydoctor-cli 2.0.1
File Size Uploaded Provenance
pydoctor_cli-2.0.1.tar.gz 61.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pydoctor-cli 2.0.1
File Interpreter ABI Platform
pydoctor_cli-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 133.6 kB

Release files / pydoctor_cli-2.0.1.tar.gz

Download URL pydoctor_cli-2.0.1.tar.gz
Size 61.8 kB
Tags Source
SHA-256 checksum
How to use checksums
27aa24bb26e14669d4f5e032168ec3c047ecb0fe19a935b248c79c818858c72d
BLAKE2b-256 checksum
How to use checksums
c35884870692b16591cfa878e66f7ebc6fb59aece85c35c2eddeff5f1500a979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / pydoctor_cli-2.0.1-py3-none-any.whl

Download URL pydoctor_cli-2.0.1-py3-none-any.whl
Size 71.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d21915d6dd3a8efa3629542585b8a40400e9a5523c9647fb66e49efef3904c43
BLAKE2b-256 checksum
How to use checksums
1715e3a08fbe25d78f23d9633cd740a37ac111da894630d06e1dde0104f2791f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for pydoctor-cli 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pydoctor_cli-2.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page