Skip to content

Getting Started with qv

qv is a package-manager-agnostic diagnostic platform for Python projects. It analyzes your project configuration, environment, source code imports, and dependency tree to pinpoint health issues and suggest safe, actionable fixes.


1. Installation & Execution

# Run project health scorecard
uvx python-qv doctor
# or
pipx run python-qv doctor

# Run detailed diagnostic scan
uvx python-qv scan
uv add python-qv --dev
pip install python-qv
poetry add python-qv --group dev
# Using uv tool
uv tool install python-qv

# Using pipx
pipx install python-qv
pip install git+https://github.com/inzamol/qv.git
git clone https://github.com/inzamol/qv.git
cd qv

# Using uv
uv pip install -e .

# Using pip
pip install -e .

2. Initialize Project Configuration (qv init)

Before running extensive scans or configuring custom rule thresholds, initialize standard settings in your pyproject.toml:

qv init

This creates a standard [tool.qv] configuration block without overwriting any of your existing project settings:

[tool.qv]
min_severity = "warning"

[tool.qv.dependencies]
ignore = [
    "amqp",
]

[tool.qv.rules]
DEP-003 = "warning"
SQL-014 = "error"

[tool.qv.paths]
exclude = [
    "tests",
    "migrations",
]

You can also generate a ready-to-run GitHub Actions workflow:

qv init --ci github

3. Run Project Health Doctor (qv doctor)

Get a complete project health report across all 6 core pillars (Dependencies, Security, Packaging, Architecture, Environment, Framework) with progress bars and top priority issues:

qv doctor

Example output:

QV Project Health
────────────────────────────────────────

Dependencies      92/100   █████████░
Security           84/100   ████████░░
Packaging          96/100   ██████████
Architecture       78/100   ████████░░
Environment        91/100   █████████░
Framework          88/100   █████████░

Health Score: 87/100

3 high-priority issues
7 warnings
42 checks passed

Top problems:
  1. SQL-014  N+1 query detected
  2. DEP-002  Missing dependency: httpx
  3. ENV-003  Python version mismatch

Run `qv explain SQL-014` for details.

4. Run Detailed Diagnostic Scan (qv scan)

Run qv scan in your project root to perform a comprehensive diagnostic audit with full evidence panels:

qv scan

Example output:

🔍 qv
Project: my-api
Python:  3.12.7
Package Manager: uv

🔴 1 Errors   🟡 1 Warnings   🟢 48 Checks Passed

┌────────────────── 🔴 DEP-001 Dependency constraint conflict ─────────────────┐
│ celery 5.4.0 requires kombu<5.4.0,>=5.3.0, but installed is kombu 5.5.2.     │
│                                                                              │
│ Evidence:                                                                    │
│   • celery declared requirement: kombu<5.4.0,>=5.3.0                         │
│   • Installed kombu version: 5.5.2                                           │
│                                                                              │
│ Suggested fix:                                                               │
│   Upgrade celery or pin kombu to <5.4.0,>=5.3.0.                             │
│   $ uv add 'kombu<5.4.0,>=5.3.0'                                             │
└──────────────────────────────────────────────────────────────────────────────┘

Health Score: 85/100

5. Explore & Remediate Findings

5.1 Interactive TUI Dashboard (qv inspect)

Launch the interactive terminal dashboard to navigate findings, inspect evidence, view dependency trees, and apply fixes with keyboard shortcuts:

qv inspect

5.2 Safe Automated Remediation (qv fix)

Safely apply deterministic fixes (such as adding undeclared dependencies or pruning unused packages):

# Preview proposed diffs without touching disk
qv fix --dry-run

# Apply all safe fixes automatically
qv fix -y

6. Understand Diagnostic Rules (qv explain)

If a specific diagnostic rule is flagged, you can get in-depth guidance, common causes, and remediation advice:

qv explain DEP-001

7. Next Steps