Replace text in remote file
replace_in_fileReplace all exact text matches in a file and write changes back, with backup by default.
Instructions
Read a file, replace all exact text matches, and write it back with backup by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | Exact text to replace. | |
| path | Yes | File path relative to the configured domain root. | |
| backup | No | Back up existing file before writing. | |
| domain | Yes | Configured domain root to operate under. | |
| dry_run | No | Return preview without writing. | |
| replace | No | Replacement text. | |
| server_id | No | Server profile id. Defaults to config.defaultServer. | |
| backup_label | No | Backup label used in the generated filename. |