Reference

willo_write_file

Create a file, or replace a whole existing file, in the business's site code on GitHub.

  • Act
  • May need approval
  • Secret scan
  • Metered
Generated from Willo's codeOpen in ClaudeOpen in ChatGPT
On this page

Write a site file. Lands on the draft branch while the business is drafting (nothing is live until a person publishes); when drafting is OFF it lands on main and the LIVE site rebuilds at once (willo_status shows whether drafting is on). Replacing an existing file REQUIRES its sha from willo_read_file — a missing or stale sha is refused, so you never overwrite what you have not read; to change part of a file use willo_edit_file. Runs without a card like Willo's chat, EXCEPT package.json and lockfiles: a dependency change needs a person's approval (pending_approval + link; call again with the same arguments after). Refused: build, CI, hosting and package-manager config files, git internals (the refusal names the file), and any secret-shaped value (keys and tokens never go in site files). Each change can be undone from the dashboard. If a live deploy fails, Willo does not auto-fix it: you do.

Access

  • Token: read + act, and editor access or higher on the business.
  • Approval: Only when Willo's chat would stop for the same action. The description says when; otherwise the call runs at once.
  • Secret scan: refused if the new content holds a value shaped like an API key or token.
  • Metered: counts toward a per-business, per-minute limit for this kind of call. See Limits.

Parameters

ParameterTypeRequiredDescription
pathstringyesRepo-relative path, e.g. src/pages/pricing.astro.
contentstringyesThe whole file, exactly as it should be.
shastringnoThe file's sha from willo_read_file. Required to replace an existing file; omit to create a new one.
summarystringnoOne plain sentence for the owner on what this does for them (shown in the dashboard and the commit).