ashlr__multi_edit
Atomic batched edits across N files in one round-trip. Rolls back all changes if any single edit fails.
Server: ashlr-multi-edit — servers/multi-edit-server.ts
Applies multiple ashlr__edit-style edits across any number of files in a single tool call. All edits are applied atomically: if any edit fails (search string not found, ambiguous match), every prior change is rolled back using the cached original content.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
edits | Edit[] | yes | Array of edit objects (see below) |
Edit object
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | File to edit |
search | string | yes | Exact string to find |
replace | string | yes | Replacement string |
strict | boolean | no | Reject if search matches more than once (default: true) |
Output format
Returns a summary line per file on success, or a rollback report on failure:
Example
Savings baseline
Each edit in the batch saves the same ~60–90 % as a single ashlr__edit. The additional savings from batching: N calls collapsed to 1, eliminating N−1 round-trips.
Related tools
ashlr__edit— single-file variant