Apply changes
apply_changesCreate, edit, or delete files in a project in one commit.
Use this to change a project's code directly. Takes up to 50 file changes and writes them as one commit. An edit replaces exact 'old' text with 'new' text; if any edit does not match, nothing is written and the error names the file. Requires a running dev server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | All file changes for the task. Each item is one of: {"path": "app/routes/index.tsx", "content": "<full file>"} writes a whole file (created if missing); {"path": "app/routes/index.tsx", "replacements": [{"old": "...", "new": "..."}]} edits an existing file in place; {"path": "app/components/Old.tsx", "delete": true} deletes a file. | |
| message | No | Commit message for this batch, imperative and under 72 characters. Generated when omitted. | |
| project_name | Yes | Name of the project |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |