patch --versionwatch the demo ↓

open source · apache-2.0

Detect upstream API breaking changes and Dependabot-style dependency updates — then open PRs that fix your TypeScript/JavaScript codebase.

Package is @patch-dev/cli. If npx patch hits the unrelated npm package, use npx -y --package=@patch-dev/cli patch init.

Patch editor fix: createCharge gains a required currency parameter, typecheck passes at confidence 0.85
@@ -12,3 +12,7 @@

@@ demo @@

Watch a scan become a PR

From upstream break to a reviewed fix — connectors, classification, and the agentic loop in one pass. Raw MP4 on GitHub →

@@ two jobs, one bot @@

API breaks and dependency bumps

Same scan → classify → PR/Issue pipeline. One bot for SDK surface changes and for npm version/security updates.

API breaking changes

OpenAPI diffs, package .d.ts diffs, and doc scrape feed an agentic fix loop with validation and confidence ceilings — then a PR or Issue.

  • openapi-diff · package-diff · doc-scrape
  • propose → validate → revise ≤3
  • confidence ≥ threshold → PR

Dependabot-style updates

Watches npm package.json dependencies. Patch + minor bumps by default; majors opt-in. OSV advisories raise confidence so security bumps land as PRs.

  • dependency-update connector
  • npm only in MVP
  • enabled by patch init when package.json exists

@@ how it works @@

From upstream shift to reviewed PR

Connectors watch API sources and npm deps. Scanners map API changes onto call sites; dependency updates bump package.json. An agentic fix loop proposes, validates, and revises — then the GitHub App opens a PR or Issue by confidence.

patch init → detect API deps + languages → config + Action + App install
                │
                ▼ (on schedule)
connector fetch → diff snapshot → classify (ChangeEvent)
      → map FixInstruction → LanguageScanner(s) / package.json
      → agentic fix loop (propose → validate → revise ≤3)
      → confidence ≥ threshold? PR : Issue → update snapshot

change event types

renamedremovedadded_required_paramtype_changedsecurity_advisorydependency_bump

@@ bring your own model @@

Anthropic or OpenAI — your key

Classify and fix call a pluggable provider. Config stores provider and api_key_env only — never the key. patch init asks which to use; patch scan fails fast if that env var is missing.

Anthropic · Claude

Set provider: "anthropic" and api_key_env: "ANTHROPIC_API_KEY".

OpenAI · GPT

Set provider: "openai" and api_key_env: "OPENAI_API_KEY".

@@ connectors @@

Four connectors, one pipeline

Downstream stages do not special-case connector types. API sources and dependency updates share the same classify → fix → publish path.

openapi-diff

Formal OpenAPI JSON/YAML. Structural contract diffs with the highest signal.

reliability · highest

package-diff

npm/PyPI plus .d.ts signatures. Exact surface-area comparison.

reliability · high

dependency-update

npm registry + OSV advisories. Dependabot-style version and security bumps for package.json.

reliability · high

doc-scrape

HTML docs with no formal spec. The LLM carries more of the burden.

reliability · lower

@@ quick start @@

Init, scan, review

The bin is named patch. The npm package is @patch-dev/cli. Confirm connectors (including dependency-update when a package.json exists), pick a model provider, install the GitHub App, and let scheduled scans open PRs.

Terminal running npx patch init: detects TypeScript, OpenAI and Stripe connectors, writes patch.config.json and GitHub Action
# In your TS/JS repo
npx patch init
npx patch scan --dry-run

# If npx patch hits the wrong package:
npx -y --package=@patch-dev/cli patch init

# Required: ANTHROPIC_API_KEY or OPENAI_API_KEY
# (matches patch.config.json → model.api_key_env)

# Optional: GITHUB_TOKEN or the Patch GitHub App
# Without it, reports land in .patch/reports/

@@ confidence @@

Validation caps the score

Above confidence_threshold (default 0.7) → PR via the GitHub App (or GITHUB_TOKEN). Below → Issue with the same diagnosis. You always review before it merges.

confidence, capped by validation

Hightsc + tests pass · uncapped
Moderatetsc passes, no tests · ≤ 0.75
Lowtsc fails · ≤ 0.25

confidence gate

Confidence gate: same scan opens a pull request at 0.85 or an issue at 0.55 depending on confidence_threshold 0.7

@@ open source @@

Open source first. Hosted when you want it.

Patch is open source under Apache-2.0 — the CLI, connectors, scanners, PR templates, and schemas. Run it yourself, fork it, or use hosted scheduling when you'd rather not operate the pipeline.

Open source · Apache-2.0

Everything you need to detect breaks, bump deps, and propose fixes ships in the open.

Hosted

Cross-customer scheduler, billed model calls, and certified connector packs for APIs without formal specs.

  • multi-tenant scheduler
  • LLM classification + fixes
  • certified connector packs

@@ known mvp limitations @@

Honest about the edges

Call-site scanning ships for TypeScript/JavaScript; other language scanners detect the repo but do not yet match call sites. Dependency updates are npm-only. Dynamic import() is not scanned; the PyPI registry path is stubbed.

TS/JS call sites · shippingdependency-update · npm onlydynamic import() not scannedPyPI path stubbed