screenmat documentation

The machine door — a Node API, a command line and an MCP server, all driving the same renderer as the web app.

  • Overview — What the machine door is, requirements, a 60-second quickstart in all three modes, and which settings each façade can reach.
  • CLI — The four command forms, URL capture, every flag with its default and bounds, output paths, the --json result shape, exit codes and error messages.
  • MCP server — How to register the server, the write guard (SCREENMAT_OUT, never overwrites), and the four tools — screenmat_capture, screenmat_render, screenmat_inspect, screenmat_list_styles — with their full parameters.
  • Node API — render(spec), inspect(input, settings, pan) and capture(url, options), their result types, and the errors they throw.
  • Scene format — The complete serialisable JSON — settings, composition, shots, layers, watermark, palette — every field with its default and its bounds, plus how validation clamps rather than rejects.
  • Coordinates — The layer coordinate frame. Read this before placing any annotation: rects are fractions of the window width, y included, and w/h are signed.
  • Styles — Tune once in the app, export a .json, drop it in ~/.screenmat/styles/, recall it by name. Precedence and caching.
  • Recipes — Runnable examples — batch, device frames, deterministic backgrounds, redaction, annotations, compositions, Playwright — followed by a troubleshooting list.