multiedit
Apply multiple text replacements to a file in one atomic call. Uses sequential edits, preserves encoding, and supports dry-run preview.
Instructions
Applies multiple old_string -> new_string replacements to a single file in one call. Edits are applied sequentially in order; each edit sees the result of the previous one. Atomic: if any edit fails, the file is not modified at all. Encoding-aware: preserves original file encoding (UTF-8, EUC-KR, Shift-JIS, etc.). Accepts "path" as alias for "file_path". Use dry_run=true to preview all changes without modifying the file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | Absolute path to the file to edit | |
| path | No | Alias for file_path | |
| edits | Yes | Ordered list of replacements to apply sequentially | |
| dry_run | No | Preview changes without modifying the file: true or false. Default: false |