Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

clawpatch

> 编程语言
Open source

Review code. Patch bugs. Land PRs.

782 stars0 likes0 views
WebsiteGitHub

About

Review code. Patch bugs. Land PRs.

clawpatch — Review by feature, fix by finding.

Clawpatch maps a repository into semantic feature slices, asks an installed coding agent to review each slice, and stores evidence-backed findings for later repair. It is for maintainers who want review, patching, and revalidation to stay explicit and resumable.

Install

bash
pnpm add -g clawpatch

Or with npm:

bash
npm install -g clawpatch

Clawpatch requires Node.js 22 or newer.

Quick start

Start in a Git repository:

bash
cd /path/to/repository
clawpatch init
clawpatch map
clawpatch status

Initialization creates project-local state under .clawpatch/. The default mapper inspects repository structure without calling a model.

With a supported coding agent installed and authenticated, run the first review:

bash
clawpatch doctor
clawpatch review --limit 3
clawpatch report

Review progress goes to stderr. Findings and run records remain under .clawpatch/, so interrupted work can resume without starting over.

Workflow

Stage Command Result
Initialize clawpatch init Detect the project and write configuration.
Map clawpatch map Create durable semantic feature records.
Review clawpatch review Run bounded, parallel reviews and persist findings.
Inspect clawpatch next, show, report Prioritize and examine evidence.
Repair clawpatch fix --finding Apply one explicit patch attempt and run configured validation.
Confirm clawpatch revalidate --finding Re-check the finding against the current code.
Publish clawpatch open-pr --patch Commit the recorded patch files, push a branch, and open a pull request.

Use clawpatch ci --since origin/main --output clawpatch-report.md for the source-read-only init, map, review, and report loop in CI. The quickstart walks through the full workflow, and the code-review guide covers selection, concurrency, rate limits, and diff-scoped review.

Feature mapping

Clawpatch detects reviewable boundaries across Node.js and TypeScript, Python, Ruby, PHP, Go, Rust, C and C++, Java and Kotlin, .NET, and Swift projects. Mappers use manifests, framework conventions, routes, packages, targets, tests, and nearby context; generated directories and symlinked directories are skipped.

Mapping is deterministic by default. --source auto and --source agent can add provider-assisted slices when the repository needs deeper interpretation. See Feature Mapping for supported project shapes and known gaps.

Providers

The default provider is the local Codex CLI. Clawpatch also integrates ACP-compatible agents through ACPX and has adapters for Claude Code, Grok Build, OpenCode, Pi, and an experimental Cursor Agent path.

Providers are installed coding harnesses or agent CLIs; Clawpatch does not call model APIs directly. Authentication, model transport, and agent execution remain with the selected harness. See Providers for setup, model selection, permissions, and isolation details, and VISION.md for the project boundary.

State and configuration

Clawpatch stores configuration, feature records, findings, patch attempts, reports, and run history under .clawpatch/. Commands that support --json keep machine-readable results on stdout and send human progress to stderr.

Configuration can set include and exclude paths, provider defaults, context limits, and validation commands. Start with Configuration, then use the focused guides for findings, patching, reporting, and validation.

Safety

Clawpatch requests read-only provider execution for review and revalidation. fix requires a finding ID, refuses a dirty source worktree by default, records changed files and validation results, and does not commit or push. Creating a commit and pull request requires the separate open-pr command; Clawpatch does not merge changes.

Provider sandboxes and tool restrictions differ. Read Safety before using write-capable providers on untrusted code.

Development

bash
pnpm install
pnpm typecheck
pnpm lint
pnpm format:check
pnpm test
pnpm test:coverage
pnpm build
pnpm pack:smoke

Use Node.js 22.x (22.12+), 24.x, or 26+ and the pnpm version declared in package.json for development with Vitest 5. CI tests Node.js 22, 24, and 26; the published CLI continues to support Node.js 22 or newer. pnpm test:coverage runs the full suite with V8 coverage, prints a text report, and writes JSON summary and HTML reports to coverage/.

License

MIT

Issues· 2 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptbotreview

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言