### Install Clawpatch From Source Source: https://github.com/openclaw/clawpatch/blob/main/README.md Install clawpatch from its source code using pnpm. ```bash pnpm install pnpm build pnpm link --global ``` -------------------------------- ### Install clawpatch with npm Source: https://github.com/openclaw/clawpatch/blob/main/docs/install.md Install clawpatch globally using npm. Ensure npm is installed and configured. ```bash npm install -g clawpatch ``` -------------------------------- ### Install Grok CLI Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Installs the Grok CLI. Ensure the command `grok --version` works and authenticate with the local Grok CLI. ```bash curl -fsSL https://x.ai/cli/install.sh | bash ``` -------------------------------- ### OpenCode Provider Selection Examples Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Demonstrates how to specify the OpenCode provider and model using command-line arguments or environment variables. ```bash clawpatch review --provider opencode --model opencode/big-pickle CLAWPATCH_PROVIDER=opencode CLAWPATCH_MODEL=opencode/big-pickle clawpatch review clawpatch fix --finding --provider opencode ``` -------------------------------- ### Install Pi Coding Agent Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Installs the Pi coding agent. After installation, authenticate with an API key or use the login flow. ```bash curl -fsSL https://pi.dev/install.sh | sh ``` -------------------------------- ### Install clawpatch with pnpm Source: https://github.com/openclaw/clawpatch/blob/main/docs/install.md Install clawpatch globally using pnpm. Ensure pnpm is installed and configured. ```bash pnpm add -g clawpatch ``` -------------------------------- ### Preview Clawpatch Website Locally Source: https://github.com/openclaw/clawpatch/blob/main/website/README.md Navigate to the website directory and run this command to start a local HTTP server for previewing the site. ```bash cd website python3 -m http.server 8000 ``` -------------------------------- ### Verify source installation and run doctor Source: https://github.com/openclaw/clawpatch/blob/main/docs/install.md After building from source, verify the global installation and run the 'doctor' command to check system health and provider configuration. ```bash clawpatch --version clawpatch doctor ``` -------------------------------- ### Verify clawpatch installation Source: https://github.com/openclaw/clawpatch/blob/main/docs/install.md Check the installed version of clawpatch to confirm successful installation. ```bash clawpatch --version ``` -------------------------------- ### Install Clawpatch Globally Source: https://github.com/openclaw/clawpatch/blob/main/website/index.html Installs Clawpatch globally using npm, pnpm, or from source. ```bash # npm npm install -g clawpatch ``` ```bash # pnpm pnpm add -g clawpatch ``` ```bash # From source git clone https://github.com/openclaw/clawpatch.git cd clawpatch pnpm install pnpm run build pnpm link --global ``` -------------------------------- ### ACPX Provider Migration Example Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Shows the correct way to specify an ACPX provider with a specific model, contrasting it with an incorrect equivalent. ```bash clawpatch fix --provider acpx --model codex:gpt-5-codex ``` -------------------------------- ### Verify Pi Installation Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Verifies that the Pi coding agent is installed correctly by checking its version. ```bash pi --version ``` -------------------------------- ### Install Codex CLI with Homebrew Source: https://github.com/openclaw/clawpatch/blob/main/docs/install.md Install the Codex CLI using Homebrew. This is a prerequisite for using the local Codex CLI as an AI provider for clawpatch. ```bash brew install codex ``` -------------------------------- ### ACPX Agent and Model Selection Examples Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Illustrates how to select different agents and models when using the ACPX provider. The format is typically or :. ```bash # Unset: agent codex, default model # codex: agent codex, default model # claude: agent claude, default model # claude:sonnet-4-5: agent claude, model sonnet-4-5 # ollama:llama3:70b: agent ollama, model llama3:70b ``` -------------------------------- ### Install and Authenticate Claude Code CLI Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Before using the Claude provider, install the Claude Code CLI and authenticate it with your Anthropic API key. This sets up the necessary environment for Clawpatch to interact with Claude. ```bash export ANTHROPIC_API_KEY=sk-ant-... claude --version ``` -------------------------------- ### Run clawpatch commands Source: https://github.com/openclaw/clawpatch/blob/main/docs/index.md After installation and project initialization, use these commands to perform various actions with clawpatch. The `--json` flag outputs stable JSON to stdout, while progress and warnings go to stderr. ```bash # Map repo into reviewable features clawpatch map # Review features in parallel clawpatch review --limit 3 --jobs 3 # Generate findings report clawpatch report # Fix a specific finding clawpatch fix --finding # Re-validate after manual edits clawpatch revalidate --finding ``` -------------------------------- ### Build clawpatch from source Source: https://github.com/openclaw/clawpatch/blob/main/docs/install.md Clone the clawpatch repository, install dependencies, build the project, and link it globally. This method is for development or when the npm package is not suitable. ```bash git clone https://github.com/openclaw/clawpatch.git cd clawpatch pnpm install pnpm build pnpm link --global ``` -------------------------------- ### Review features using Grok provider Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Specify the Grok provider for code reviews instead of the default Codex. Requires Grok Build CLI installation. ```bash clawpatch review --provider grok --limit 3 --jobs 3 ``` -------------------------------- ### Test Codex CLI Connection Source: https://github.com/openclaw/clawpatch/blob/main/website/index.html Tests the connection to the local Codex CLI and checks the Clawpatch environment setup. ```bash # Test connection codex --version clawpatch doctor ``` -------------------------------- ### Get Next Finding Source: https://github.com/openclaw/clawpatch/blob/main/README.md Retrieve the next available finding for review or triage. ```bash clawpatch next ``` -------------------------------- ### Verify Cursor Agent Availability Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Check if the Cursor Agent CLI is installed and accessible, and if Clawpatch can interact with the Cursor provider. ```bash cursor-agent --version clawpatch doctor --provider cursor ``` -------------------------------- ### Initiate a Patch for a Specific Finding Source: https://github.com/openclaw/clawpatch/blob/main/docs/patching.md Use this command to start the explicit fix process for a single finding. It reads the finding, checks the worktree, and initiates a patch attempt. ```bash clawpatch fix --finding ``` -------------------------------- ### Verify Codex CLI and clawpatch doctor Source: https://github.com/openclaw/clawpatch/blob/main/docs/install.md Confirm that the Codex CLI is installed and accessible, and then run 'clawpatch doctor' to ensure it can communicate with the configured AI provider. ```bash codex --version clawpatch doctor ``` -------------------------------- ### Get JSON output for mapping, review, and status Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md All clawpatch commands support the --json flag for machine-readable output, useful for scripting and automation. ```bash clawpatch map --json ``` ```bash clawpatch review --json ``` ```bash clawpatch status --json ``` -------------------------------- ### Check Codex CLI Version and Doctor Source: https://github.com/openclaw/clawpatch/blob/main/README.md Use this command to check the installed version of the Codex CLI and run the doctor to verify provider availability. ```bash codex --version clawpatch doctor ``` -------------------------------- ### Check Environment for Clawpatch Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md Run `clawpatch doctor` to check the environment for necessary prerequisites like Node version, package installations, Git, and provider configurations. It never prints secret values. ```bash clawpatch doctor [--json] ``` -------------------------------- ### Clawpatch Initialization Details Source: https://github.com/openclaw/clawpatch/blob/main/website/index.html Details the files created by `clawpatch init`, including configuration and project metadata. ```bash clawpatch init This creates .clawpatch/ directory with: * `config.json` — User settings and preferences * `project.json` — Detected project metadata (package manager, build tools, test commands) ``` -------------------------------- ### Initialize Project State Source: https://github.com/openclaw/clawpatch/blob/main/docs/initialization.md Run `clawpatch init` to create project-local state and detect project details. Use `--force` to replace existing detection output. ```bash clawpatch init ``` ```bash clawpatch init --force ``` -------------------------------- ### Clawpatch Init Command Usage Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md Command to initialize project state and detect configuration. Use --force to overwrite existing state. ```bash clawpatch init [--force] [--no-input] ``` -------------------------------- ### Initialize clawpatch project Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Run this command in your project's root directory to initialize clawpatch. It creates necessary configuration files and directories. ```bash cd your-project clawpatch init ``` -------------------------------- ### Get Current npm Package Version Source: https://github.com/openclaw/clawpatch/blob/main/docs/release-prep.md Retrieves the version of the current package from package.json. ```javascript node -p "require('./package.json').version" ``` -------------------------------- ### Save report to a file Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Output the generated report to a specified file, for example, 'report.md'. ```bash clawpatch report -o report.md ``` -------------------------------- ### Clawpatch Configuration File Source: https://github.com/openclaw/clawpatch/blob/main/website/index.html Indicates that `clawpatch init` creates a `.clawpatch/config.json` file for user settings and preferences. ```bash `clawpatch init` writes a complete `.clawpatch/config.json`: ``` -------------------------------- ### Review and Report Commands Source: https://github.com/openclaw/clawpatch/blob/main/docs/feature-mapping.md Use these commands to review code, set limits, and report on project status. Specify the project and limit for review, or the project and status for reporting. ```bash clawpatch review --project apps/web --limit 10 ``` ```bash clawpatch review --project web --limit 10 ``` ```bash clawpatch report --project web --status open ``` ```bash clawpatch next --project web ``` -------------------------------- ### Build Project and Run Smoke Test Source: https://github.com/openclaw/clawpatch/blob/main/docs/release-prep.md Builds the project and then runs a smoke test. Ensures the build output is functional. ```bash pnpm build ``` ```bash pnpm pack:smoke ``` -------------------------------- ### Run Clawpatch Review with Options Source: https://github.com/openclaw/clawpatch/blob/main/docs/code-review.md Use `clawpatch review` to process feature records. Options include limiting the number of reviews, specifying parallel jobs, targeting a specific feature ID, reviewing changes since a branch, setting a review mode, and choosing an AI provider and model. ```bash clawpatch review --limit 3 ``` ```bash clawpatch review --limit 12 --jobs 4 ``` ```bash clawpatch review --feature ``` ```bash clawpatch review --since origin/main ``` ```bash clawpatch review --mode deslopify --limit 3 ``` ```bash clawpatch review --provider codex --model ``` -------------------------------- ### Enable Experimental Cursor Provider Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Activate the experimental Cursor provider for review, fix, or other operations. Set CLAWPATCH_CURSOR_EXPERIMENTAL=1. For write operations like 'fix', also set CLAWPATCH_CURSOR_ALLOW_WRITE=1. ```bash CURSOR_API_KEY=... CLAWPATCH_CURSOR_EXPERIMENTAL=1 clawpatch review --provider cursor CURSOR_API_KEY=... CLAWPATCH_CURSOR_EXPERIMENTAL=1 CLAWPATCH_PROVIDER=cursor clawpatch review CURSOR_API_KEY=... CLAWPATCH_CURSOR_EXPERIMENTAL=1 CLAWPATCH_CURSOR_ALLOW_WRITE=1 clawpatch fix --finding --provider cursor --model clawpatch doctor --provider cursor ``` -------------------------------- ### Preview feature mapping without writing Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Use the --dry-run flag to see what features would be mapped without actually creating or modifying any files. ```bash clawpatch map --dry-run ``` -------------------------------- ### Select Claude Provider for Clawpatch Commands Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Demonstrates how to specify the Claude provider for various Clawpatch commands. You can set the provider globally via environment variable or per-command. ```bash clawpatch review --provider claude ``` ```bash CLAWPATCH_PROVIDER=claude clawpatch review ``` ```bash clawpatch fix --finding --provider claude ``` ```bash clawpatch doctor --provider claude ``` -------------------------------- ### Clawpatch Commands Overview Source: https://github.com/openclaw/clawpatch/blob/main/website/index.html Lists the available Clawpatch commands for project management, code analysis, and patching. ```bash * `clawpatch init` — Initialize project, detect config * `clawpatch map` — Build semantic feature map * `clawpatch status` — Show project/review state * `clawpatch review` — Review features, find issues * `clawpatch report` — Generate findings report * `clawpatch fix` — Apply repairs for findings * `clawpatch revalidate` — Verify fixes or findings * `clawpatch doctor` — Check environment setup ``` -------------------------------- ### Generate Basic Report Source: https://github.com/openclaw/clawpatch/blob/main/docs/reporting.md Renders current findings in the default Markdown format. Use the -o flag to specify an output file. ```bash clawpatch report ``` ```bash clawpatch report -o report.md ``` -------------------------------- ### Recommended .gitignore Entry for Clawpatch Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md This snippet provides a recommended entry for a `.gitignore` file to exclude Clawpatch's generated runtime artifacts from version control. It specifically targets directories like `runs`, `findings`, `patches`, `reports`, and `locks` within the `.clawpatch` directory. ```gitignore .clawpatch/runs/ .clawpatch/findings/ .clawpatch/patches/ .clawpatch/reports/ .clawpatch/locks/ ``` -------------------------------- ### Run Clawpatch Map Command Source: https://github.com/openclaw/clawpatch/blob/main/docs/feature-mapping.md These commands initiate the feature mapping process. Use `--dry-run` to see what would happen without making changes, or specify `--source` to control the mapping strategy. ```bash clawpatch map ``` ```bash clawpatch map --dry-run ``` ```bash clawpatch map --source auto ``` ```bash clawpatch map --source agent --provider codex ``` -------------------------------- ### View npm Package Version Source: https://github.com/openclaw/clawpatch/blob/main/docs/release-prep.md Fetches the latest published version of a package from the npm registry. ```bash npm view clawpatch version --json ``` -------------------------------- ### Select Codex model Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Specify the AI model to use with the Codex provider, either via command-line argument or environment variable. ```bash clawpatch review --model CLAWPATCH_MODEL= clawpatch review ``` -------------------------------- ### Review with a specific model Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Utilize a particular AI model for the code review process by specifying its name. ```bash clawpatch review --model claude-opus-4-20250514 --limit 5 ``` -------------------------------- ### Check clawpatch project status Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Verify that clawpatch has correctly detected your project and its features. ```bash clawpatch status ``` -------------------------------- ### Suggested npm Scripts for Clawpatch Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md These scripts automate common development tasks such as building, type checking, linting, formatting, and testing for the Clawpatch project. ```json { "scripts": { "build": "tsc -p tsconfig.json", "typecheck": "tsc -p tsconfig.json --noEmit", "lint": "oxlint .", "format": "oxfmt --write .", "format:check": "oxfmt --check .", "test": "vitest run" } } ``` -------------------------------- ### Map features for review Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Discover reviewable features within your project. This command identifies various code constructs like package bins, routes, modules, and more. ```bash clawpatch map ``` -------------------------------- ### Generate a code review report Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Create a summary report of the review findings. This command aggregates information from the findings directory. ```bash clawpatch report ``` -------------------------------- ### Open a GitHub PR for a Patch Attempt Source: https://github.com/openclaw/clawpatch/blob/main/docs/patching.md After reviewing and validating changes, use this command to create a GitHub Pull Request. It requires a validated patch attempt and uses the GitHub CLI to push the branch and open the PR. ```bash clawpatch open-pr --patch --draft ``` -------------------------------- ### Clawpatch Project-Local State Directory Structure Source: https://github.com/openclaw/clawpatch/blob/main/README.md This structure outlines the default project-local state managed by Clawpatch. Feature records are central, with findings and patches linking back for auditability and resumption. ```text .clawpatch/ config.json project.json features/*.json findings/*.json patches/*.json reports/*.md runs/*.json ``` -------------------------------- ### Authenticate Pi with Subscription Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Logs into the Pi coding agent using its interactive login flow for subscription-based authentication. ```bash pi /login ``` -------------------------------- ### Inspect Findings with Clawpatch CLI Source: https://github.com/openclaw/clawpatch/blob/main/docs/findings.md Use these commands to inspect and view finding details. The `status` command shows the current status of findings, `next` prioritizes findings for review, `show` displays a specific finding, and `report` generates a summary. ```bash clawpatch status clawpatch next clawpatch show --finding clawpatch report clawpatch report -o report.md clawpatch report --json clawpatch report --status open --severity high clawpatch report --feature ``` -------------------------------- ### Clawpatch Project-Local State Directory Layout Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md This text-based representation outlines the standard directory structure within the `.clawpatch` directory. It includes subdirectories for configuration, project data, features, findings, runs, patches, reports, and locks. This structure helps organize Clawpatch's internal state and generated artifacts. ```text .clawpatch/ config.json project.json features/ .json findings/ .json runs/ .json patches/ .json reports/ .md locks/ .json ``` -------------------------------- ### List Git Tags Source: https://github.com/openclaw/clawpatch/blob/main/docs/release-prep.md Lists local Git tags matching a specific pattern. Useful for checking if a release tag already exists. ```bash git tag --list "vX.Y.Z" ``` -------------------------------- ### Review entire project with multiple jobs Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Perform a comprehensive review of all features in the project, utilizing multiple parallel jobs for faster processing. ```bash clawpatch review --limit 999 --jobs 4 ``` -------------------------------- ### Clawpatch Status Command Usage Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md Command to display the current project and review state. Can output in JSON format. ```bash clawpatch status [--json] ``` -------------------------------- ### Configure Validation Commands Source: https://github.com/openclaw/clawpatch/blob/main/docs/validation.md Configure validation commands like format, lint, typecheck, and test in .clawpatch/config.json. These commands are detected during `clawpatch init`. ```json { "commands": { "format": "pnpm format", "lint": "pnpm lint", "typecheck": "pnpm typecheck", "test": "pnpm test" } } ``` -------------------------------- ### Clawpatch Code Review Details Source: https://github.com/openclaw/clawpatch/blob/main/website/index.html Describes the output of the `clawpatch review` command, including finding categories, severity, confidence, and evidence. ```bash clawpatch review --limit 10 Reviews produce findings with: * **Category** — bug, security, performance, docs-gap, test-gap, maintainability * **Severity** — critical, high, medium, low * **Confidence** — How certain the analysis is (high, medium, low) * **Evidence** — Code snippets, file locations, and reasoning ``` -------------------------------- ### Clawpatch Feature Mapping Details Source: https://github.com/openclaw/clawpatch/blob/main/website/index.html Explains the types of features Clawpatch maps, such as routes, commands, and packages, to provide context for AI reviewers. ```bash clawpatch map Features are semantic units like: * **Routes** — Next.js app/pages routes plus Flask and FastAPI routes * **Commands** — npm package bins plus Python, Go, Rust, and SwiftPM commands * **Packages** — Go internal packages, Rust libraries, and Swift targets * **CLI scripts** — Bin scripts and npm script handlers * **Tests** — Test suites linked to their subjects ``` -------------------------------- ### Dry Run npm Pack Source: https://github.com/openclaw/clawpatch/blob/main/docs/release-prep.md Simulates packing the npm package without actually creating the tarball. Useful for verifying package contents before publishing. ```bash npm pack --dry-run --json --ignore-scripts ``` -------------------------------- ### Use Smaller Model for Low-Cost Smoke Checks Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md To perform low-cost smoke checks, you can explicitly pass a smaller model like 'claude-haiku-4-5-20251001' and limit the operation to one iteration. ```bash clawpatch review --provider claude --model claude-haiku-4-5-20251001 --limit 1 ``` -------------------------------- ### Run Typecheck, Lint, and Format Check Source: https://github.com/openclaw/clawpatch/blob/main/docs/release-prep.md Executes type checking, linting, and code formatting checks using pnpm. Ensures code quality and consistency. ```bash pnpm typecheck ``` ```bash pnpm lint ``` ```bash pnpm format:check ``` -------------------------------- ### List GitHub Releases Source: https://github.com/openclaw/clawpatch/blob/main/docs/release-prep.md Lists recent GitHub releases for a repository. Useful for auditing existing releases before preparing a new one. ```bash gh release list --repo openclaw/clawpatch --limit 20 --json tagName,isPrerelease,isDraft,publishedAt,isLatest ``` -------------------------------- ### Review features in parallel Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Initiate a code review for multiple features concurrently. Adjust --limit and --jobs to control the number of features and parallel workers. ```bash clawpatch review --limit 3 --jobs 3 ``` -------------------------------- ### List open findings Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Display a list of all findings that are currently in an 'open' state, which can then be targeted for fixing. ```bash clawpatch report --status open ``` -------------------------------- ### Configure Codex provider with trusted config Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Load a trusted configuration file to specify Codex provider settings, including model, reasoning effort, and custom API endpoints. Clawpatch rejects non-empty provider.codexConfig from auto-discovered configurations. ```json { "provider": { "name": "codex", "model": null, "reasoningEffort": null, "codexConfig": { "model_provider": "local", "model_providers.local.base_url": "https://example.invalid/v1", "model_providers.local.env_key": "CLAWPATCH_CODEX_API_KEY" } } } ``` -------------------------------- ### Run Go Tests for Vector Package Source: https://github.com/openclaw/clawpatch/blob/main/docs/e2e-gitcrawl.md Executes Go tests specifically for the internal/vector package. This command is used for targeted validation of code changes. ```bash GOCACHE=/tmp/gitcrawl-go-cache GOWORK=off go test ./internal/vector ``` -------------------------------- ### View Specific GitHub Release Source: https://github.com/openclaw/clawpatch/blob/main/docs/release-prep.md Displays details of a specific GitHub release. Useful for verifying release notes and assets. ```bash gh release view "vX.Y.Z" --repo openclaw/clawpatch ``` -------------------------------- ### Review with explicit reasoning effort Source: https://github.com/openclaw/clawpatch/blob/main/docs/quickstart.md Control the reasoning effort for the AI model during review by setting a specific level, such as 'xhigh'. ```bash clawpatch review --model gpt-5.5 --reasoning-effort xhigh --limit 5 ``` -------------------------------- ### ProjectRecord Schema Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md Defines the structure for project-level metadata, including repository details, detected languages, frameworks, and package managers. ```typescript type ProjectRecord = { schemaVersion: 1; projectId: string; name: string; rootPath: string; git: { remoteUrl: string | null; defaultBranch: string | null; currentBranch: string | null; headSha: string | null; }; detected: { languages: string[]; frameworks: string[]; packageManagers: string[]; commands: ProjectCommands; }; createdAt: string; updatedAt: string; }; ``` -------------------------------- ### Authenticate Pi with API Key Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Sets the Anthropic API key for authentication with the Pi coding agent. ```bash export ANTHROPIC_API_KEY=sk-ant-... ``` -------------------------------- ### Create or Update a Repair Pull Request Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md Use `clawpatch open-pr` to create or update a pull request for a patch attempt. This command requires an existing patch attempt and uses the GitHub CLI to create the PR. ```bash clawpatch open-pr --patch [--draft] [--base ] ``` -------------------------------- ### Review Report Location Source: https://github.com/openclaw/clawpatch/blob/main/docs/reporting.md The 'review' command also generates a Markdown report for each run, stored in a specific directory. ```text .clawpatch/reports/.md ``` -------------------------------- ### Review Specific Features by File Source: https://github.com/openclaw/clawpatch/blob/main/docs/code-review.md Use `--feature-list` to review only the feature IDs specified in a file. Each feature ID must be on a new line. This mode cannot be combined with other selection flags. ```bash clawpatch review --feature-list /tmp/features.txt ``` -------------------------------- ### Initialize Gitcrawl State Source: https://github.com/openclaw/clawpatch/blob/main/docs/e2e-gitcrawl.md Initializes the clawpatch state directory for gitcrawl. This command sets up the necessary environment for subsequent operations. ```bash node dist/cli.js --root /Users/steipete/Projects/gitcrawl --state-dir /tmp/clawpatch-gitcrawl-state.LS8z6l init ``` -------------------------------- ### Clawpatch Patching and Validation Source: https://github.com/openclaw/clawpatch/blob/main/website/index.html Explains the `clawpatch fix` command and the validation steps involved, including format, type, lint, and test checks. ```bash clawpatch fix --finding abc123 Each patch goes through validation: * **Format check** — Prettier/dprint/etc if configured * **Type check** — TypeScript `tsc --noEmit` if applicable * **Lint check** — ESLint/oxlint if configured * **Test check** — Runs the configured test command ``` -------------------------------- ### Clawpatch Global Usage Source: https://github.com/openclaw/clawpatch/blob/main/docs/spec.md The general structure for invoking Clawpatch commands with global flags and specific commands. ```bash clawpatch [global flags] [command flags] ``` -------------------------------- ### Pi Provider Selection Source: https://github.com/openclaw/clawpatch/blob/main/docs/providers.md Selects the Pi provider for Clawpatch commands. Can be set directly or via an environment variable. ```bash clawpatch review --provider pi ``` ```bash CLAWPATCH_PROVIDER=pi clawpatch review ``` ```bash clawpatch fix --finding --provider pi --model anthropic/claude-sonnet-4 ``` ```bash clawpatch doctor --provider pi ```