flipcode spec · v1

Boards as text

flipcode is a file format — a small language like Markdown or LaTeX, not a general programming language. The language is called flipcode, a document is a board file (.flip if you want an extension), and this page is the written rules: the flipcode spec, v1. Its vocabulary is exactly what a physical split-flap or flip-dot board can do — boards, slides, flip choreography, holds, click sounds — and nothing more. That constraint is the point: everything expressible in flipcode renders as a believable mechanical board, deterministically — same code, same video.

Flipcode for each template

Pick a board, watch the animation, then open the Flipcode tab to see the text that produces it — including a cheatsheet of keywords, sizes, and what each field means. Comments starting with # or // are for humans; the parser ignores them.

Station Board

board: trainboard (station) · good 8×34 · max 12×44

Best as a wide landscape board. Keep status columns aligned with spaces.

Preview of the rendered board — switch to Flipcode to see the text that produced it.

Board sizes (what looks good)

Board keywordGood sizeMax sizeNotes
minimal3×146×24Big title letters
trainboard / station8×3412×44Departures grid
artboard / art10×1820×36Pixel / paint flaps
flipdot / dots28×8456×168Dense = slower export
marquee / desk1×102×16One short word
announcement / poster7×810×12Portrait milestones

Oversized grids are clamped to the max. Bigger flip-dot boards look sharper but take longer to render. Cream Editorial and Confetti are not separate engines — they're minimal / announcement plus backdrop: cream or backdrop: confetti. New templates later would add new board: names or backdrop values; old files still parse (unknown keys warn).

Field cheat sheet

output:landscape / yt-1080 (wide 16:9) · portrait / vertical / reels (9:16 Stories) · square · yt-4k · or any WIDTHxHEIGHT 30fps
sound: … 0.8Theme first (solari thock deep clickity fizz none), then volume 0–1 (0.8 = 80% loud). Optional softness 0–1 muffles the click.
seed:Integer RNG seed. Same seed + same code = identical flips and jitter every export. Change it to re-roll the chaos.
hold:Seconds the board stays still after flips finish (0–60). Long holds for reading; short for punchy reels.
flip: sweep…How cells change: sweepColumns (left→right), cascadeRows (top→bottom), randomDissolve, wave, allAtOnce, spinStop, … Then rate (flips/sec), jitter (timing noise 0–1), stagger (delay between cells).
--- slide NStarts a new slide (any line of 3+ dashes). Max 24 slides per board. Number is optional documentation.
| textOne text row on the board. Spaces matter for alignment. Empty | = blank row.
: paintArt/dot paint row. Colors: R G B Y O P K ■ . blank · ● dot-on. One char per cell.

A complete board file

flipletters v1
board: trainboard 8x34
output: 1920x1080 30fps
title: DEPARTURES
accent: #ffb63d
sound: solari volume 0.8

--- slide 1
hold: 12s
flip: cascadeRows 11/s jitter 0.2 stagger 0.4
| TIME  DESTINATION     STATUS  TRK
| 10:25 LOS ANGELES     ON TIME  B4
| 10:41 TOKYO HANEDA    BOARDING C2

| lines are the board's text rows, spaces preserved — the code looks like the video it produces. Comments start with // or #. Open any board in the Studio and press </> FLIPCODE to see and edit it live.

Global directives

name:project name — free text
board:template + grid: minimal · trainboard/station · artboard/art · flipdot/dots · marquee/desk · announcement/poster, then ROWSxCOLS (clamped to each board's range)
output:canvas: a preset (yt-1080/landscape, yt-4k, vertical/reels, square) or any WIDTHxHEIGHT with 30fps — compact 1200x630@25 works too
title:board header (station & announcement boards)
accent:accent color — #rrggbb or #rgb
backdrop:classic · cream · confetti (minimal & announcement boards)
sound:solari · thock · deep · clickity · fizz · none, plus volume 0.8 (or 80%) and softness 0.35
speed:global pace 0.25–2, x suffix optional
seed:integer — re-rolls all deterministic jitter
watermark:on · off (off is a paid perk at export)
brief:the AI prompt this template came from

Slides

--- slidestarts a slide (any line of 3+ dashes)
hold:seconds the finished board holds, 0–60
flip:transition: allAtOnce/all · cascadeRows/cascade · sweepColumns/sweep · randomDissolve/dissolve · wave · diagonal · radial · spinStop/spin, then rate 11/s, jitter 0–1, stagger 0–1.5 — keyed or positional (flip: cascade 11 0.2 0.4)
align:left · center (flip-dot & marquee text)
| textone board text row — spaces preserved, uppercased
: cellsone paint-grid row (art & dot boards): ■ R G B Y O P K color flaps, . blank, ● dot

Recipes — flip-native effects

There is deliberately no fade, zoom, or slide-in — a flap board can't do those. Every effect people reach for has a flip-native equivalent:

Fade inthe first slide always flips up from blank; a slow randomDissolve (5/s, jitter 0.4) reads as a soft dissolve
Fade outend with an all-blank slide on randomDissolve — the board dissolves back to empty flaps
Hard cutflip: allAtOnce 20/s jitter 0
Reveal line by linecascadeRows with a large stagger
SuspensespinStop — every cell spins and locks in randomly
Hold a beatrepeat the previous slide's rows with a long hold: — identical cells don't flip
Imagespictures become flaps, not files: the Studio rasterizes an upload into : paint rows; flipcode never references image files or URLs

Boards in URLs

A template can live in a legible address — every query parameter mirrors one flipcode line, and the Studio loads it on visit. slide repeats; | separates rows:

app.flipletters.com/?board=station&grid=8x34&title=BRUNCH
  &accent=e23a55&slide=EGGS BENEDICT|FLAT WHITE&flip=cascade,9&hold=6

For full fidelity (paint grids, per-slide detail) the Studio's Copy link packs the entire board file into a #code= fragment — no account, no server storage.

Versioning & forward compatibility

Every document declares its version in the header (flipletters v1). New vocabulary arrives only under a bumped version, and parsers must ignore unknown directives with warnings rather than errors — so a v1 renderer degrades gracefully when it meets v2 vocabulary, and a messy hand-written file still parses. Only an empty document is an error.

How to use flipcode

Four common paths. Same language everywhere — Studio, npm, MCP, and plain URLs. Open source lives at github.com/tera-sarah/flipcode; packages on npm: @flipletters/flipcode · flipletters-mcp-server. Site home: flipletters.com.

A. In the Studio (no install)

  1. Open app.flipletters.com.
  2. Press </> Code.
  3. Paste a flipcode document (example at the top of this page) → Apply.
  4. Preview with sound, then Export MP4 under your plan.

B. From a share link (no account)

Anyone with a link can open the board. Readable params for short text boards:

https://app.flipletters.com/?board=station&grid=8x34&title=DEPARTURES
  &slide=ROW ONE|ROW TWO&flip=cascade,11&hold=6

Full fidelity packs the entire board into #code= (built by the library or MCP validate tool — see below).

C. In JavaScript / TypeScript

npm install @flipletters/flipcode
import {
  parseFlipcode,
  serializeProject,
  encodeFlipcodeForUrl,
} from "@flipletters/flipcode";

const source = `flipletters v1
board: minimal 3x14
output: 1920x1080 30fps
sound: thock volume 0.85

--- slide 1
hold: 4s
flip: cascadeRows 11/s jitter 0.2 stagger 0.4
|
|   HELLO WORLD
|
`;

const { project, warnings } = parseFlipcode(source);
const code = serializeProject(project);
const shareUrl =
  "https://app.flipletters.com/#code=" + encodeFlipcodeForUrl(code);
// open shareUrl in the Studio — free to preview; export uses the human's plan

More examples and the in-repo how-to: GitHub README · HOWTO.md · examples/*.flip.

D. As an AI agent (MCP)

Draft/validate need no key. Optional FLIPLETTERS_API_KEY enables cloud render and team share. Full agent section: For AI agents.

{
  "mcpServers": {
    "flipletters": {
      "command": "npx",
      "args": ["-y", "flipletters-mcp-server"],
      "env": {
        "FLIPLETTERS_API_KEY": "flk_…optional…"
      }
    }
  }
}

Billing & plans

Creating and exporting are free; the watermark is where plans apply. Free: every board type, full editor, previews with sound, share links, and unlimited watermarked MP4 exports at any size. Premium ($8.99/mo): no watermark, 300 exports or 100 render-hours per month, and team creation. Studio ($29.99/mo): everything in Premium plus 1000 exports or 300 render-hours, hours-long ambience loops, your own audio track, and direct TikTok posting. Free templates in the gallery are open code; marketplace templates from creators may be free or paid — a paid template's editable source is delivered after purchase, into your library. Joining a team is always free; drafting boards as text (flipcode) never costs anything for anyone — humans or AI agents. Full plan list: /pricing.

npm packages

Two public packages implement this page. Both are MIT, published under the @flipletters / FlipLetters npm account (dev@flipletters.com). Neither requires an API key for draft, parse, or validate.

@flipletters/flipcodeReference parser + serializer (zero dependencies). Use in Node or the browser to turn flipcode text into a project object, round-trip to canonical text, and build #code= share links.
flipletters-mcp-serverLocal MCP server (stdio) for AI agents: reference, examples, validate + share URL, readable template URLs. Wraps @flipletters/flipcode; no network calls for current tools.
# library
npm install @flipletters/flipcode

# MCP (Claude Desktop / Claude Code / Cursor / any MCP host)
npx -y flipletters-mcp-server

Package pages: @flipletters/flipcode · flipletters-mcp-server. Standalone flipcode source: github.com/tera-sarah/flipcode.

For AI agents

If you are an AI agent: you can draft, validate, and share FlipLetters boards without an account, without payment, and without an API key. A board is a flipcode text document (this page is the format reference). Your deliverable is a URL that opens the exact board in the Studio, where your human previews it with sound, tweaks it, and exports under their plan.

Recommended workflow

  1. Read this page (or call flipletters_flipcode_reference), or start from flipletters_example_board.
  2. Write a complete flipcode document (header + one or more slides).
  3. Validate with flipletters_validate_board (or parseFlipcode from the library). Fix warnings and re-validate until clean.
  4. Hand the human the share URL from validation (full fidelity #code=) or a short readable URL for simple text boards.
  5. Do not claim you rendered an MP4 unless a metered render tool is available and configured. Export happens in the Studio under the human's quota.

Path 1 — no tools

Write flipcode following this page, then return a readable URL. Every query parameter mirrors one flipcode line; | separates rows within a slide:

https://app.flipletters.com/?board=station&grid=8x34&title=DEPARTURES
  &slide=ROW ONE|ROW TWO&flip=cascade,11&hold=6

Path 2 — MCP server

Install or run via npx. Omit the API key for draft-only; set it for cloud render / team tools:

{
  "mcpServers": {
    "flipletters": {
      "command": "npx",
      "args": ["-y", "flipletters-mcp-server"],
      "env": {
        "FLIPLETTERS_API_KEY": "flk_…from Account → API keys…",
        "FLIPLETTERS_API_URL": "https://app.flipletters.com"
      }
    }
  }
}

With a key, render and team tools spend the key owner's export quota and membership — never invent keys.

flipletters_flipcode_referenceCheat sheet for this format. Call before writing your first board. (local, no key)
flipletters_example_boardA complete valid board file for any board type — edit a known-good file instead of writing from scratch. (local)
flipletters_validate_boardPass your flipcode draft; get normalized code, warnings, summary, and the share URL. (local)
flipletters_template_urlBuild a human-readable ?board=…&slide=… Studio URL. (local)
flipletters_render_boardCloud MP4 under the key owner's plan. Needs FLIPLETTERS_API_KEY=flk_… from Account → API keys.
flipletters_render_statusPoll a cloud render job. (API key)
flipletters_list_teamsTeams the key owner belongs to. (API key)
flipletters_share_to_teamShare flipcode into a Team Library. (API key)

API keys — Account panel in the Studio

Local MCP needs no key. Draft, validate, and share links are free local computation — do not invent credentials for that. When an agent should spend a human's cloud export quota or push into a Team Library, the human creates a key in the Studio: open app.flipletters.comAccountAPI keys & agents. The full secret is shown once (flk_…); revoke anytime. Keys use the same plan limits as that account (free watermarked quota, Premium/Studio caps, team membership).

Free for agents / free users: unlimited flipcode drafting, validation, share links, Studio preview, and creating API keys. Paid for the human (same as product pricing): watermark-free exports, higher quotas, 4K, long ambience, TikTok post, creating a team workspace. Joining a team by invite stays free. The agent drafts; the human (or their Premium team) owns export and collaboration. Agent MCP tools that call cloud render / team share with the key are rolling out on top of the existing Cloud Run render pipeline and Team library.

Machine-readable summary: /llms.txt.

An open format

The spec is open: anyone may write or parse flipcode. The reference implementation is @flipletters/flipcode (MIT) so scripts, bots, and AI tools can read and write board files. Rendering them as videos — flap physics, materials, synthesized click sounds — is the FlipLetters Studio. Free templates in the gallery publish their full code on listing pages, ready to copy and remix.