edit_crossproject
Apply consistent search-and-replace edits across multiple files in configured companion workspaces, with optional regex support and replaceAll for repetitive cross-project updates.
Instructions
Apply search-and-replace edits to one or more files in a configured workspace root, typically for companion repos outside the current project workspace. Prefer built-in IDE refactoring/editing tools for typed changes in the current workspace. The same find/replace runs on all specified files; oldString must be unique per file unless replaceAll is true. If a writeAllowlist is configured, only matching paths are editable. When useRegex=true, newString supports regex backreferences ($1, $2, etc.).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Single file path or array of file paths relative to workspace root | |
| useRegex | No | Treat oldString as a regex pattern (default: false). Enables $1/$2 backreferences in newString. | |
| newString | Yes | Replacement string. When useRegex=true, supports $1/$2 backreferences for capture groups. | |
| oldString | Yes | String to find and replace (must be unique in each file unless replaceAll=true) | |
| workspace | Yes | Workspace name (none configured — create a workspace-config.json) | |
| replaceAll | No | Replace all occurrences in each file (default: false, requires uniqueness) |