Menu

CLI & Webhooks

Push multi-file builds from CI with folio-push and automate agents with signed webhooks

Pushing Designs with folio-push

app/scripts/folio-push.mjs is a zero-dependency Node/Bun CLI that authenticates with an organization API key (FOLIO_API_KEY) and pushes prototypes directly into Folio.

Push a Single Standalone HTML File

bash
FOLIO_URL=https://folio.example.com \
FOLIO_API_KEY=oat_your_key \
bun app/scripts/folio-push.mjs ./prototype.html \
  --org acme \
  --name "Checkout Flow"

Merge Multiple HTML Files into a Multi-Screen Flow

Pass multiple files to automatically combine them into one data-folio-screen prototype:

bash
FOLIO_API_KEY=oat_your_key \
bun app/scripts/folio-push.mjs ./screens/welcome.html ./screens/pricing.html ./screens/done.html \
  --org acme \
  --name "Onboarding"

Push a Static Build Directory (Auto Asset Upload)

Point folio-push at a directory such as ./dist: it locates index.html, uploads referenced images, SVGs, CSS, and fonts to /api/orgs/{slug}/design/{id}/assets, rewrites paths to /review-assets/{design_id}/…, and publishes a clean round.

bash
FOLIO_API_KEY=oat_your_key \
bun app/scripts/folio-push.mjs ./dist \
  --org acme \
  --design 12 \
  --summary "PR #42 preview build"

Outgoing Webhooks

Configure organization webhooks from the Start next round → Webhooks modal (or POST /api/orgs/{slug}/webhooks).

Supported Events

Event When it fires
ready_for_ai A reviewer clicks Trigger AI webhook to ask an external agent/CI job to revise the round.
round_created A new round is uploaded manually, patched via 1-click apply, or published via MCP.
note_created A new note/pin is added to a round.
round_approved A reviewer approves a round.

Verifying Signatures

Every webhook delivery is processed durably via oxidt-jobs and carries:

  • X-Folio-Event: event name (e.g. ready_for_ai)
  • X-Folio-Webhook-Id: UUID of the webhook
  • X-Folio-Signature: sha256=<base64url(SHA-256(secret + "." + rawBody))>