write_file
Write or overwrite a project file in specified valid directories: public/, api/, api/_lib, migrations/, seed.sql, hatchable.toml, or package.json. Paths are relative to the project root. Content is saved but not live until the project is deployed.
Instructions
Write or overwrite a project file. Paths are relative to the project root.
Valid locations: public/** static files (HTML, CSS, JS, images, etc.) api/.js backend functions (each file is one endpoint) api/_lib/ shared helpers imported by api/ files, not routed migrations/*.sql database migrations, run in filename order seed.sql optional seed data, runs once on fresh installs hatchable.toml optional config overrides package.json dependencies (no build script yet)
Files are stored but not live until you call deploy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID (e.g. proj_a8Kq7fR2xZ) | |
| path | Yes | File path relative to project root. Must be under public/, api/, migrations/, or one of: seed.sql, hatchable.toml, package.json | |
| content | Yes | File content |