CLI Reference • Open Source

PromptScan CLI

Install with pipx or pip, then run scans locally or on any public GitHub repo URL.

Installation
pipx install prompt-scan

Recommended: Install with pipx for isolated environment.

Alternative: pip install --user prompt-scan

Quick start
prompt-scan https://github.com/owner/repo

Paste a public GitHub URL directly. The tool fetches the repo ZIP and scans it.

Scan a local folder
prompt-scan scan ./path/to/project

Scans locally, respecting .gitignore and language filters.

Output formats
  • --output cli Human-readable (default)
  • --output json JSON to stdout (pipe to files or tools)
  • --output html Coming soon

Example: prompt-scan <url> --output json > results.json

Filtering & thresholds
  • -s high -s critical Only include selected severities.
  • --min-confidence 0.4 Suppress low-confidence findings.
  • --strict Stricter filtering (higher thresholds, doc/test suppression).
Performance & UX
  • --parallel 8 Increase workers for faster scans.
  • --no-progress Clean stdout (useful with JSON or CI).
  • --no-cache Disable caching for fresh scans.
  • --verbose Extra logs for debugging.
Index a repository
prompt-scan index ./path --out index.json

Create a JSON index of scannable files (useful for cache/debug).

List rules
prompt-scan rules

Show available rules and languages loaded from YAML.

Benchmark & tuning
  • prompt-scan bench --manifest src/benchmarks/manifest.yaml Run suite.
  • prompt-scan bench --tune Auto-suggest confidence thresholds (beta).
  • Constraints: --min-precision 0.9 --min-recall 0.6
Examples
  • Scan a popular repo: prompt-scan https://github.com/octocat/Hello-World
  • Local scan with filters: prompt-scan scan . -s high -s critical --min-confidence 0.3