{"id":51310144,"url":"https://github.com/patchloom/patchloom","last_synced_at":"2026-07-01T03:00:48.353Z","repository":{"id":362398686,"uuid":"1239125030","full_name":"patchloom/patchloom","owner":"patchloom","description":"Single-binary CLI that gives AI agents safe, structured file editing","archived":false,"fork":false,"pushed_at":"2026-06-27T16:15:20.000Z","size":4182,"stargazers_count":4,"open_issues_count":8,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-27T16:19:29.759Z","etag":null,"topics":["ai-agents","ast","automation","cli","code-analysis","code-generation","developer-tools","devtools","file-editing","json","mcp","model-context-protocol","rust","structured-editing","toml","tree-sitter","yaml"],"latest_commit_sha":null,"homepage":"https://github.com/patchloom/patchloom","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patchloom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":"GOVERNANCE.md","roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-14T19:36:10.000Z","updated_at":"2026-06-27T15:58:38.000Z","dependencies_parsed_at":"2026-06-20T16:03:42.275Z","dependency_job_id":null,"html_url":"https://github.com/patchloom/patchloom","commit_stats":null,"previous_names":["patchloom/patchloom"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/patchloom/patchloom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patchloom%2Fpatchloom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patchloom%2Fpatchloom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patchloom%2Fpatchloom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patchloom%2Fpatchloom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patchloom","download_url":"https://codeload.github.com/patchloom/patchloom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patchloom%2Fpatchloom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34990845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","ast","automation","cli","code-analysis","code-generation","developer-tools","devtools","file-editing","json","mcp","model-context-protocol","rust","structured-editing","toml","tree-sitter","yaml"],"created_at":"2026-07-01T03:00:27.781Z","updated_at":"2026-07-01T03:00:48.347Z","avatar_url":"https://github.com/patchloom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.svg\" alt=\"Patchloom logo\" width=\"200\"\u003e\n\u003c/p\u003e\n\n# Patchloom\n\n[![CI](https://github.com/patchloom/patchloom/actions/workflows/ci.yml/badge.svg)](https://github.com/patchloom/patchloom/actions/workflows/ci.yml)\n[![Security](https://github.com/patchloom/patchloom/actions/workflows/security.yml/badge.svg)](https://github.com/patchloom/patchloom/actions/workflows/security.yml)\n[![crates.io](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SebTardif/6a26adf6bfae45f530465f626c9154f4/raw/crate-version.json\u0026logo=rust)](https://crates.io/crates/patchloom)\n[![Release](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SebTardif/6a26adf6bfae45f530465f626c9154f4/raw/release.json\u0026logo=github)](https://github.com/patchloom/patchloom/releases/latest)\n[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue)](./LICENSE)\n\n[![Tests](https://img.shields.io/badge/tests-2800%2B%20passing-brightgreen)](#)\n[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SebTardif/6a26adf6bfae45f530465f626c9154f4/raw/coverage.json)](https://github.com/patchloom/patchloom/actions/workflows/ci.yml)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13097/badge)](https://www.bestpractices.dev/projects/13097)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/patchloom/patchloom/badge)](https://securityscorecards.dev/viewer/?uri=github.com/patchloom/patchloom)\n[![FOSSA Status](https://github.com/patchloom/patchloom/actions/workflows/fossa.yml/badge.svg)](https://github.com/patchloom/patchloom/actions/workflows/fossa.yml)\n\n[![Docs](https://img.shields.io/badge/docs-patchloom.github.io-blue?logo=mdbook)](https://patchloom.github.io/patchloom/)\n[![VS Code Marketplace](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SebTardif/d01e4551b744b77e2927555e43a4b935/raw/version.json)](https://marketplace.visualstudio.com/items?itemName=patchloom.patchloom)\n[![crates.io downloads](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SebTardif/6a26adf6bfae45f530465f626c9154f4/raw/crates-downloads.json\u0026logo=rust)](https://crates.io/crates/patchloom)\n\n**One binary. Every platform. Structured file edits for AI agents.**\n\nPatchloom is a single-binary CLI that gives AI coding agents safe, structured file editing on any operating system. It edits JSON, YAML, and TOML by selector (not regex), preserves comments, understands code structure across 20 languages, batches multiple file edits into one tool call, and works identically on Linux, macOS, and Windows.\n\n![Patchloom demo: 6 edits across 4 files in JSON, YAML, and TOML — one command, comments preserved](demo/demo.gif)\n\n```bash\n# Edit a YAML value by selector without breaking comments or formatting\npatchloom doc set config.yaml database.port 5432 --apply\n\n# Batch 6 file edits into a single tool call\npatchloom batch --apply \u003c\u003c'EOF'\ndoc.set package.json version \"2.0.0\"\ndoc.set config.yaml app.version \"2.0.0\"\ndoc.set config.toml project.version \"2.0.0\"\nreplace README.md \"1.0.0\" \"2.0.0\"\nreplace CHANGELOG.md \"1.0.0\" \"2.0.0\"\nfile.create VERSION \"2.0.0\"\nEOF\n```\n\n**[Why Patchloom?](#why-patchloom)** | **[Install](#install)** | **[Quick start](#quick-start)** | **[Commands](#commands)** | **[Comparison](#how-patchloom-compares)** | **[Architecture](#how-it-works-with-your-ai-agent)** | **[Status](#status)**\n\n---\n\n## Why Patchloom?\n\n### The problem\n\nAI agents edit files through tool calls. Each call is a round-trip back to the LLM. When a task touches config files, that process has three failure modes:\n\n1. **Syntax corruption.** The agent uses text replacement on JSON, YAML, or TOML and produces invalid output (mismatched braces, broken indentation, lost comments).\n2. **Round-trip tax.** Editing 6 files means 6 separate tool calls. Each one waits for the LLM to generate, execute, read the result, and plan the next call.\n3. **Platform fragmentation.** On Linux the agent uses `sed`, `jq`, `grep`. On Windows, none of those exist. The agent falls back to verbose PowerShell or makes errors with unfamiliar syntax.\n\n### How patchloom solves each one\n\n| Problem | How patchloom solves it |\n|---|---|\n| **Syntax corruption** | `doc` commands parse the file, change the value by selector path, and write valid output. Comments and formatting are preserved. No regex needed. |\n| **Round-trip tax** | `batch` and `tx` combine N operations into 1 tool call. Six file edits become one command with atomic rollback on failure. |\n| **Platform fragmentation** | Single static binary with zero dependencies. Same commands, same flags, same behavior on Linux, macOS, and Windows. |\n\n### What changes with patchloom\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Without patchloom** (6 tool calls)\n\n```\nAgent: edit file 1  ─── tool call ───▶  15s\nAgent: edit file 2  ─── tool call ───▶  15s\nAgent: edit file 3  ─── tool call ───▶  15s\nAgent: edit file 4  ─── tool call ───▶  15s\nAgent: edit file 5  ─── tool call ───▶  15s\nAgent: edit file 6  ─── tool call ───▶  15s\n                                    Total: ~90s\n```\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n**With patchloom batch** (1 tool call)\n\n```\nAgent: batch with\n  all 6 edits     ─── tool call ───▶  25s\n\n\n\n                  5 round-trips saved\n                                    Total: ~25s\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Key capabilities\n\n| Capability | What it does | Example |\n|---|---|---|\n| **Parser-backed edits** | Edit JSON/YAML/TOML by selector, preserving comments and formatting | `doc set config.yaml db.port 5432 --apply` |\n| **Batch N files in 1 call** | `batch` and `tx` combine operations into one tool call with rollback | `batch --apply \u003c ops.txt` |\n| **Comment preservation** | YAML/TOML comments survive all edits, including array resizing | `doc append config.yaml tags '\"v2\"' --apply` |\n| **Heading-aware markdown** | Edit sections, tables, and bullets by heading, not line number | `md table-append README.md --heading \"API\" --row \"\\| new \\| row \\|\" --apply` |\n| **AST-aware code ops** | List, rename, replace, and analyze symbols across 20 languages | `ast rename src/ old_name new_name --apply` |\n| **Atomic rollback** | `strict: true` reverts every file if format or validate steps fail | `tx plan.json --apply` |\n| **MCP server** | Expose all operations as structured MCP tool calls | `patchloom mcp-server` |\n| **Cross-platform** | Identical behavior on Linux, macOS, Windows. No `sed`, `jq`, `grep` required. | Same binary everywhere |\n\n### When to use patchloom vs native tools\n\nPatchloom is not a replacement for all file operations. Its instructions tell agents exactly when to use it and when native tools are faster:\n\n| Task | Use patchloom? | Why |\n|---|---|---|\n| Edit a JSON/YAML/TOML value by selector | **Yes** | Parser guarantees valid output, preserves comments |\n| Edit 3+ files in one task | **Yes** | `batch`/`tx` eliminates round-trips |\n| Append a row to a markdown table | **Yes** | Heading-aware, no line number guessing |\n| Read a single file | No | Native `read_file` is faster |\n| Simple text search | No | Native `grep` is faster |\n| Single-file text replacement | No | Native `search_replace` is faster |\n\n### Correctness over speed\n\nPatchloom is not faster than native tools for simple, single-file edits. Use native tools for those. But native text replacement cannot safely edit structured files: a `sed` on YAML can corrupt indentation, strip comments, or produce invalid syntax. `doc set` parses the file, changes the value by selector, and writes valid output. That guarantee is the point.\n\nWhere patchloom *is* faster is multi-file batching. Six file edits via native tools means six round-trips to the LLM. One `batch` call does the same work in a single round-trip.\n\n\u003cdetails\u003e\n\u003csummary\u003eBenchmark details (Claude Opus 4 via Grok Build, 11 tasks)\u003c/summary\u003e\n\n```\nTask                    PL-CLI    MCP    Native\n──────────────────────  ──────  ──────  ──────\nsearch                   18.5s   12.7s   13.9s  ◀ ~same\nreplace                  36.1s   26.6s   26.1s  ◀ ~same\ndoc_set                  30.9s   16.9s   13.7s  ◀ native fastest\nmd_table                 15.5s   13.5s   15.3s  ◀ MCP fastest\ntx_multi_file            41.4s   28.5s   22.9s  ◀ native fastest\nbatch_6_files            50.6s   46.6s   30.3s  ◀ native fastest\nbatch_mixed_ops          24.7s   13.6s   20.9s  ◀ MCP fastest\nyaml_comment_preserve    18.1s   11.6s   16.1s  ◀ MCP fastest\nmd_insert                15.0s   11.7s   15.7s  ◀ MCP fastest\nfile_ops                 26.0s   16.6s   17.2s  ◀ ~same\ntidy                     45.0s   30.3s   41.7s  ◀ MCP fastest\n──────────────────────  ──────  ──────  ──────\nTOTAL                   321.9s  228.5s  233.8s\n```\n\nMCP mode wins overall (228.5s vs 233.8s native) because structured tool calls skip shell syntax construction entirely. MCP wins 5/11 tasks; native wins 3/11; 3 are ties. CLI mode is always slowest due to shell construction overhead.\n\n\u003c/details\u003e\n\n---\n\n## Install\n\n```bash\n# Homebrew (macOS/Linux)\nbrew install patchloom/tap/patchloom\n\n# crates.io (requires Rust 1.95+, includes MCP server)\ncargo install patchloom\n```\n\nPre-built binaries for Linux, macOS, and Windows are on the\n[Releases](https://github.com/patchloom/patchloom/releases/latest) page.\nSee [Installation](./docs/getting-started/installation.md) for shell\ninstaller scripts, source builds, and shell completion setup.\n\n### Editor extension\n\nInstall the companion extension for VS Code, Cursor, Windsurf, or VSCodium:\n\n- [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=patchloom.patchloom)\n- [Open VSX Registry](https://open-vsx.org/extension/patchloom/patchloom)\n\nThe extension auto-discovers the CLI (or installs it for you), generates\nAGENTS.md, configures MCP servers, and adds Quick Actions to the command\npalette. See the [Editor Extension guide](./docs/getting-started/editor-extension.md) for details.\n\n## Quick start\n\n### 1. Set up your project\n\n```bash\npatchloom init\n```\n\nThis creates `AGENTS.md` in a new project or appends the rules to an existing agent instructions file, offers shell completions, and detects MCP configuration opportunities. Pass `-y` to skip confirmation prompts.\n\nIf you only want the rules text:\n\n```bash\npatchloom agent-rules \u003e\u003e AGENTS.md\n\n# Or tailor the output:\npatchloom agent-rules --mode mcp \u003e\u003e AGENTS.md            # MCP-only (no CLI examples)\npatchloom agent-rules --platform windows \u003e\u003e AGENTS.md    # Windows-only syntax\n```\n\nIf `.vscode/` or `.cursor/` exists, `init` also prints ready-to-copy `.vscode/mcp.json` or `.cursor/mcp.json` snippets.\n\nYour AI agent reads `AGENTS.md` and learns when to use patchloom vs native tools.\n\n### 2. Edit a config file safely\n\n```bash\n# Parser-backed: changes the value, preserves comments and formatting\npatchloom doc set config.yaml database.port 5432 --apply\n```\n\n### 3. Batch multiple edits into one call\n\n```bash\npatchloom batch --apply \u003c\u003c'EOF'\ndoc.set config.json version \"2.0\"\nmd.upsert_bullet AGENTS.md \"Rules\" \"- Always test\"\nreplace src/main.rs \"v1\" \"v2\"\nEOF\n```\n\nOr use a JSON plan with format and validate lifecycle:\n\n```json\n{\n  \"version\": 1,\n  \"operations\": [\n    { \"op\": \"doc.set\", \"path\": \"config.json\", \"key\": \"version\", \"value\": \"2.0\" },\n    { \"op\": \"md.upsert_bullet\", \"path\": \"AGENTS.md\", \"heading\": \"Rules\", \"bullet\": \"- Always test\" },\n    { \"op\": \"replace\", \"path\": \"src/main.rs\", \"old\": \"v1\", \"new\": \"v2\" }\n  ],\n  \"format\": [{ \"cmd\": \"cargo fmt --all\" }],\n  \"validate\": [{ \"cmd\": \"cargo test\", \"required\": true }]\n}\n```\n\n```bash\npatchloom tx plan.json --apply\n```\n\n`tx` plans are trusted input. `format` and `validate` run their `cmd` fields through the host shell (`sh -c` on Unix, `cmd /C` on Windows), so only run plans you trust.\n\n### 4. Or use MCP for structured tool calls (no shell syntax)\n\nAfter [installing with MCP support](#install), start the server:\n\n```bash\npatchloom mcp-server\n```\n\nMCP-capable agents call patchloom tools directly as structured JSON, with no shell quoting or command construction. The agent sends `{\"path\": \"config.json\", \"key\": \"version\", \"value\": \"2.0\"}` instead of building `patchloom doc set config.json version '\"2.0\"' --apply`.\n\nSee the [MCP setup guide](./docs/getting-started/mcp-setup.md) for per-agent configuration and the full security model.\n\n\u003e **Using VS Code, Cursor, or Windsurf?** The [Patchloom extension](https://marketplace.visualstudio.com/items?itemName=patchloom.patchloom) handles setup automatically: it installs the binary, runs init, and configures your editor's MCP settings.\n\n### As a Rust library\n\nAdd patchloom as a dependency (omit CLI/MCP/AST with `default-features = false`):\n\n```toml\n[dependencies]\npatchloom = { default-features = false }\n```\n\n```rust\nuse patchloom::api::{self, ApplyMode};\nuse std::path::Path;\n\n// Replace text (preview only, no disk write)\nlet result = api::replace_text(\n    Path::new(\"src/config.rs\"),\n    \"old_value\", \"new_value\",\n    \u0026api::ReplaceOptions::default(),\n    ApplyMode::Preview,\n    None,\n)?;\nprintln!(\"{}\", result.diff);\n\n// Set a value in a JSON file\napi::doc_set(\n    Path::new(\"config.json\"),\n    \"version\",\n    serde_json::json!(\"2.0\"),\n    ApplyMode::Apply,\n    None,\n)?;\n```\n\nAll API types are `Send + Sync`. Beyond the `api` module, utility modules are also public: `containment` (workspace path guarding), `exec` (shell command execution), `files` (file-walking and binary detection), and `write` (atomic file writes with policy transformations). Library users needing temp dirs (e.g. agents) can use `PathGuard::builder(cwd).allow_temp_directory()` (handles /tmp on macOS per #781); see the `containment` and `api` module rustdocs. See the `patchloom::api` module docs for the full surface (includes `search_directory` with context/globs/max_results for content search, added in recent library expansions). Recent work: #785 merged (assertion hygiene); gate addressed #779 (full context+multi for search_directory) and #784 (test auditor).\n\n## Getting started\n\n| Resource | What you'll learn |\n|---|---|\n| [Installation](https://patchloom.github.io/patchloom/getting-started/installation.html) | Install options and shell completions |\n| [Core concepts](https://patchloom.github.io/patchloom/getting-started/concepts.html) | Write modes, transaction plans, exit codes |\n| [MCP setup](https://patchloom.github.io/patchloom/getting-started/mcp-setup.html) | Configure patchloom as an MCP server for your agent |\n| [Editor extension](./docs/getting-started/editor-extension.md) | VS Code, Cursor, Windsurf, and VSCodium integration |\n| [Quickstart](https://patchloom.github.io/patchloom/getting-started/quickstart.html) | 5-minute walkthrough |\n| [Reference](https://patchloom.github.io/patchloom/reference/) | Every command, operation, and mode |\n| [Examples](./examples/README.md) | Transaction plan templates |\n\n## Commands\n\n### Agent-optimized (these are faster or safer than native tools)\n\n| Command | What it does | When to use |\n|---|---|---|\n| `batch` | Line-oriented multi-file edits in 1 call | Editing 3+ files with simple syntax |\n| `tx` | JSON plan with format/validate lifecycle | Complex multi-file edits with rollback |\n| `doc` | Parser-backed JSON/YAML/TOML edits | Changing config values without breaking syntax |\n| `md` | Heading-aware markdown edits | Updating tables, sections, bullets in docs |\n| `ast` | AST-aware symbol operations (20 languages) | Renaming identifiers, listing symbols, impact analysis |\n| `patch` | Apply unified diffs with stale detection | Replaying patches safely |\n| `tidy` | Text-file whitespace and newline normalization | CI checks for text tidiness |\n| `mcp-server` | MCP protocol server | MCP-capable agents (no shell syntax) |\n\n### General-purpose (also useful in scripts and CI)\n\n| Command | Description |\n|---|---|\n| `search` | Fast literal or regex search across text files (supports --glob/--exclude/--ignore-file for .blineignore-style layered filtering, --max-results, -C context, etc.) |\n| `replace` | Mechanical string replacement across text files with diff preview |\n| `append` | Append content to an existing file |\n| `create` | Create a new file with content |\n| `delete` | Delete a file |\n| `rename` | Move (rename) a file |\n| `read` | Read file contents with optional line range |\n| `status` | Show which files have uncommitted changes |\n| `explain` | Summarize a tx plan in plain English |\n| `undo` | Restore files from a backup created by `--apply` |\n| `completions` | Generate shell completions (bash, zsh, fish, elvish) |\n| `init` | Set up patchloom in a project (agent rules, completions, MCP) |\n| `schema` | Export operation schemas with tier filtering and system prompts |\n| `agent-rules` | Generate agent instructions for your project |\n\n## How patchloom compares\n\n| Tool | Strength | Where patchloom differs |\n|------|----------|------------------------|\n| **jq** | JSON query/transform | patchloom also handles YAML, TOML, markdown; batches across files; preserves comments |\n| **yq** | YAML/JSON query/transform | patchloom preserves YAML comments via CST editing; adds markdown, batching, atomic transactions |\n| **dasel** | Multi-format get/set | patchloom adds batching (N edits in 1 call), atomic rollback, format/validate lifecycle |\n| **sd** | Regex find/replace | patchloom adds parser-backed structured edits; batching; never produces invalid JSON/YAML |\n| **comby** | Structural code patterns | patchloom targets config files and agent workflows, not source code pattern matching |\n\nThe key difference: patchloom is designed for AI agent workflows. One `batch` or `tx` call replaces N sequential tool calls, cutting round-trips and eliminating partial-failure states.\n\n### vs agent-native editing tools\n\nThe table above compares patchloom to human CLI tools. But agents already have built-in editing: Claude Code's `edit_file`, Cursor's apply, Grok Build's `search_replace`, Aider's `/code` blocks. Why add patchloom on top?\n\n**Agent-native tools use text matching.** They find a block of text and replace it. This works for source code but fails on structured config files:\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Agent uses `search_replace` on YAML**\n\n```yaml\ndatabase:\n  # Production settings\n  host: db.prod.internal\n  port: 5432  # PostgreSQL default\n  pool_size: 10\n```\n\nThe agent replaces `port: 5432` with `port: 5433`. Result depends on implementation. Many agents lose the inline comment, break indentation, or fail to match because of surrounding context changes.\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Agent uses `patchloom doc set`**\n\n```bash\npatchloom doc set config.yaml \\\n  database.port 5433 --apply\n```\n\nThe YAML parser changes the value at the selector path. Comments, indentation, key ordering, and all other formatting are preserved. The output is always valid YAML.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n| Limitation of agent-native tools | How patchloom addresses it |\n|---|---|\n| **Comment destruction** | CST-level YAML/TOML editing preserves all comments |\n| **One file per tool call** | `batch`/`tx` edit N files in 1 call (6.7x faster in benchmarks) |\n| **No rollback** | `tx` with `strict: true` reverts all files if validation fails |\n| **Platform-dependent** | Same binary and syntax on Linux, macOS, Windows |\n| **Stale context risk** | `patch apply` uses fuzz matching to handle context drift |\n\n**When to keep using native tools:** Single-file reads, simple text search, single-file text replacement where comments don't matter. Patchloom's agent-rules tell agents exactly when to use each approach.\n\n## How it works with your AI agent\n\nTwo integration modes, same capabilities:\n\n```mermaid\nflowchart LR\n    subgraph CLI[\"CLI mode (any agent)\"]\n        direction TB\n        A[\"patchloom agent-rules \u003e\u003e AGENTS.md\"] --\u003e B[\"Agent reads AGENTS.md\"]\n        B --\u003e C{\"What kind of edit?\"}\n        C --\u003e|Simple edit| D[\"Native tool (faster)\"]\n        C --\u003e|Config edit| E[\"patchloom doc (safer)\"]\n        C --\u003e|Markdown edit| F[\"patchloom md (smarter)\"]\n        C --\u003e|Multi-file edit| G[\"patchloom batch (batched)\"]\n    end\n\n    subgraph MCP[\"MCP mode (MCP-capable agents)\"]\n        direction TB\n        H[\"patchloom mcp-server\"] --\u003e I[\"Agent discovers tools via MCP\"]\n        I --\u003e J[\"Structured JSON tool calls\"]\n        J --\u003e K[\"No shell syntax needed\"]\n    end\n```\n\n## Status\n\n2800+ tests across 22 commands. Tested with Grok 4.3, GPT-5.4, and Claude Opus 4.6.\n\n| Component | Status |\n|---|---|\n| CLI | Published on [crates.io](https://crates.io/crates/patchloom) and [Homebrew](https://github.com/patchloom/homebrew-tap) |\n| Editor extension | Published on [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=patchloom.patchloom) and [Open VSX](https://open-vsx.org/extension/patchloom/patchloom) |\n\n## Full command reference\n\nEvery command, flag, transaction operation, and exit code is documented in the **[Command Reference](https://patchloom.github.io/patchloom/reference/)** (also available at [docs/reference/README.md](docs/reference/README.md)).\n\n## License\n\nLicensed under either of:\n\n- MIT license ([LICENSE](./LICENSE))\n- Apache License, Version 2.0 ([LICENSE-APACHE](./LICENSE-APACHE))\n\nat your option.\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n\nFor local verification before opening a pull request, run `make check`. It matches the main Linux CI gate: formatting, clippy, unit tests, integration tests, and generated-doc freshness checks. While iterating locally, `make check-fast` runs the Rust formatting, lint, and test path without the generated-doc freshness checks.\n\nAll commits must be signed off with `git commit -s`.\n\n### Agent integration tests\n\n`make agent-test` runs 19 pytest scenarios that verify AI agents correctly use patchloom when given instructions. `make bench-agent` runs 3-way benchmarks (CLI vs MCP vs native) across 11 tasks. Use `MODEL=X` to switch models and `RUNS=N` for variance reduction. Requires an LLM API key. Not part of `make check`. See [tests/agent/README.md](./tests/agent/README.md) for details.\n\n## Security\n\nFor current security reporting guidance, see [SECURITY.md](./SECURITY.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatchloom%2Fpatchloom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatchloom%2Fpatchloom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatchloom%2Fpatchloom/lists"}