Skip to main content

patchops CLI

Official command-line interface for PatchOps Guard — SBOM generation, CVE scanning, and AI-driven fix jobs without leaving your terminal.

Install

pip install patchops-guard

Or install from source:

git clone https://github.com/superlabs-x/patchops-guard
pip install -e cli/

Authentication

patchops auth login --api-key pk_live_...
patchops auth status
patchops auth logout

Credentials are stored with permissions 0600 at:

  • Linux / macOS: ~/.config/patchops/config.toml
  • Windows: %APPDATA%\patchops\config.toml

Environment variables take precedence:

  • PATCHOPS_API_KEY — bearer token
  • PATCHOPS_BASE_URL — API host (default https://patchguard.ai)

Scans

# Auto-detect: URL, lockfile, or docker image
patchops scan auto package-lock.json
patchops scan auto https://example.com
patchops scan auto nginx:1.25

# Explicit commands
patchops scan manifest package-lock.json --format json --output scan.json
patchops scan website https://example.com --fail-on-severity high
patchops scan docker nginx:1.25 --format sarif --output scan.sarif

Common flags:

  • --format json|table|sarif — output shape (default table)
  • --output FILE — write to file (stdout is default)
  • --severity critical|high|medium|low — show only findings at or above
  • --fail-on-severity SEVERITY — exit non-zero when met (CI-friendly)

Findings

patchops findings list --status open --severity high
patchops findings get <finding-uuid>

AI Repair

patchops repair start <finding-uuid> --wait
patchops repair status <job-uuid>
patchops repair list --status completed

SBOM

# Emit CycloneDX 1.6 JSON from a lockfile
patchops sbom generate package-lock.json --output sbom.json

# Upload an SBOM for OSV vulnerability matching
patchops sbom upload sbom.json

Supported lockfiles: package-lock.json, package.json, requirements.txt, Pipfile.lock, pom.xml, go.mod, Gemfile.lock, Cargo.lock, composer.lock.

Exit codes

  • 0 — success
  • 1 — general error (network, API, IO)
  • 2 — usage error (bad argument, missing auth)
  • 10-13 — --fail-on-severity threshold hit (low / medium / high / critical)

License

MIT

Metadata

Release files for patchops-guard 0.2.0

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

Source distribution (sdist)

Source distribution for patchops-guard 0.2.0
File Size Uploaded Provenance Actions
patchops_guard-0.2.0.tar.gz 53.8 kB Without provenance Details for patchops_guard-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for patchops-guard 0.2.0
File Interpreter ABI Platform Actions
patchops_guard-0.2.0-py3-none-any.whl Python 3 none any Details for patchops_guard-0.2.0-py3-none-any.whl

Total release size: 108.8 kB

Release files / patchops_guard-0.2.0.tar.gz

Download URL patchops_guard-0.2.0.tar.gz
Size 53.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f816e4f975238eb906108f58032f6edc558dc0d952d1fd4f572783e2fc686479
BLAKE2b-256 checksum
How to use checksums
5ad88e3f314e22666505fbabe9befbd9633096eff83faf5d1d0d08d071793cd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / patchops_guard-0.2.0-py3-none-any.whl

Download URL patchops_guard-0.2.0-py3-none-any.whl
Size 55.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fd895f58d60b3c034b19097ce74bdbceaa74594fb8e6c4960de4184b2e0ec94
BLAKE2b-256 checksum
How to use checksums
5801c32d6e95e035c0d6ea3d6b84ff0405d78f8f8a395b191879dd83d33cff0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for patchops-guard 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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