write_file
Create or overwrite a project file. The write takes effect on the next run or generation.
warning
The allowlist is strict. Only paths under Features/ or Configurations/ are writable, no .. segments, content ≤ 256 KB. Generated specs and template scaffolding are owned by the pipeline and can't be written. See Files & configurations.
Request
PUT /api/v1/ops/projects/{project}/files/content
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project | path | string | yes | The project's public id. |
path | body | string | yes | The file path, e.g. Configurations/Mobile.config.js. |
content | body | string | yes | The full file content (writes are whole-file). |
- cURL
- CLI
- MCP
curl -X PUT -H "Authorization: Bearer $TESTVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"path": "Configurations/Mobile.config.js", "content": "module.exports = { … };"}' \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/files/content"
testvibe files put Configurations/Mobile.config.js --file ./mobile.config.js
Tool write_file — { "path": "Configurations/Mobile.config.js", "content": "…" }.
Response
{ "ok": true }
Errors
| HTTP | When |
|---|---|
400 invalid_request | Path missing, outside Features//Configurations/, contains .., or content over 256 KB. |
404 not_found | No such project in this workspace. |