create_file
Creates a new file with the provided content. Pass an empty string to create an empty file. Changes the workspace, so it pauses on a unified diff and waits for you.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
path |
string |
Yes | File path |
content |
string |
Yes | File content. May be an empty string for an empty file. |
Example#
create_file({ path: "…", content: "…" })
Approval#
Pauses on a unified diff. Nothing is written until you approve it.
See also#
- Tools — every tool, and which of them can change your files
- Approval modes — what gates the tools that change things
Added in woopcode@0.6.0