The CLI
makinist checks, plays, renders and exports scenes. Every command takes the scene, and optionally --data <row.json> (a customer's row, set at the first frame) and --log <log.json> (inputs and data at later frames). A scene, row or log with a mistake is refused whole, with the path to the bad value, and the command exits with 1.
Check
Says valid, or names what is wrong. It also loads every image the scene and row name, from images/ beside the scene.
makinist check welcome.json --data rows/welcome/sofia.json
Render
Writes one frame as a PNG at the scene's size.
makinist render ticket.json --data rows/ticket/leyla.json --frame 380 --out leyla.png
Export
Writes every frame as an MP4 or a GIF, by the file's extension. --width scales it, keeping its shape: 600 is right for email.
makinist export demo.json --out demo.mp4
makinist export demo.json --width 600 --out demo.gif
Grid
Tiles every n-th frame onto one PNG, to see a whole scene at a glance.
makinist grid offer.json --data rows/offer/nadia.json --every 60 --columns 4 --out sheet.png
Play
Plays the scene in a window. Space, the arrows, the letters and digits are inputs; so is a click. --record keeps the session when the window closes.
makinist play renewal.json --data rows/renewal/mateo.json --record session.json
--live reads standard input as live data while it plays: each line one JSON object of state keys and values, given at the frame on screen. A line the scene refuses is reported as line 2: set["home"]: expected an existing key and a value of its type and skipped, and the video plays on when the input ends.
printf '{"home": 1, "minute": 23}\n{"away": 1}\n' | makinist play live.json --live --record session.json
Replay
Checks a recorded session against the scene, frame by frame: identical, or the first frame that differs. The same session draws the same frames anywhere, months later.
makinist play hello.json --record session.json
makinist replay hello.json session.json
Hash
Prints one frame's hash: the proof of exactly what was drawn.
makinist hash hello.json --frame 30
Key and sign
makinist key writes a new secret key to a file, never over one, and prints its public key. makinist sign signs a scene with it, writing <scene>.sig beside it. --key, on every command that reads a scene, takes a public key: given any, the scene is used only if one of them signed it.
key=$(makinist key secret.key)
makinist sign --key secret.key ticket.json
makinist check ticket.json --key "$key"
Ask server
Answers the questions viewers ask a scene with ask, by asking a language model through any chat-completions API, with the key in MAKINIST_ASK_KEY. Every answer is checked against the scene before the video shows it, and questions are capped per visitor and per day (--per-visitor, 20; --per-day, 2000).
makinist ask-server ask.json --api https://api.example.com/v1/chat/completions --model small-model --origin https://example.com
Give the player the endpoint with ask="http://localhost:8787/ask", and it shows the scene's suggestions and a text box under the video.
New
Makes a piece from a brief: a language model writes the scene, three to five example customers and the studio's entry, through any chat-completions API, with the key in MAKINIST_ASK_KEY. Each reply is checked as check checks a scene; a refusal goes back to the model with its path, for at most five rounds, and the command exits with 1 and the last refusal if none passes. Images come from the library in pieces/images (--images for another), and only the ones it lists.
makinist new "a match day for a football club" --out match-day --api https://api.example.com/v1/chat/completions --model large-model
It writes match-day/scene.json, match-day/rows/1.json and on, match-day/studio.json and the images they name, and prints valid. With --look, the model sees six frames of its piece once, and may change it, if it reads images.
MCP
Serves a coding agent or an editor over the Model Context Protocol on stdio, so the agent writes pieces itself: guide gives it the scene format, an example and the rules of taste; check checks its piece as new checks a model's; render draws a frame of it as a PNG. No model runs here, and no key is needed. Run it in a checkout, or give --images the image library.
The line an agent's MCP settings need:
{"command": "makinist", "args": ["mcp"]}