One of 40 things your AI can do in your Instroc account, in Build
Write app files
write_
Makes changes Writes to the app's code
Ask your AI
- Fix the typo on the about page
What it does
Writes one or more text files in an Instroc app's source code as one change, without a Roc build, such as changing a phone number in the footer, fixing a typo on the about page or setting a price.
Each file takes either its whole new content or exact edits (old_text and new_text), each old_text matching exactly once in the file. The change is all or nothing: when any file cannot be written, none is. Fits requests like 'change the phone number in the footer to ...', 'fix the typo on the about page', 'set the price to 12'. Before writing, the app's current files are saved as a version, and the result names it: restore_app_version with that version undoes the change. The live site changes on the next publish_app. Available on paid plans, and uses no credits. Refused while a build or a restore is running on the app, for content holding a key, for package, lock, secret and binary files, for a file above 100 KB and above 1 MB of text in one call. No build runs on the change, so it is not checked to compile. Needs the editor role. While people and data sharing is on for any app this account administers, and for 24 hours after it is turned off, this tool is held: it changes nothing and uses no credits, and the account holder does this in the Instroc editor.
This is the text your AI reads, word for word.
- Changes
- Yes. It writes to the app's source files, and the current ones are saved first. The live site changes on the next publish.
- Role needed
- Editor in the app's workspace
- Cost
- Available on paid plans, and uses no credits.
Inputs
project_idRequired- The app's project_id, as returned by list_my_apps.
filesRequired- The files to write, each with exactly one of content or edits. Up to 100 KB per file and 1 MB of text per call.