Skip to content
PuniDocs
Open Puni

Quickstart


Build the command line, make a scene from a study, change it with one command file, evaluate it, render a PNG, and push it to your library.

The command line is a preview for Puni's own team. It builds from Puni's private repository and is not published to npm, so you can run it only with access to that repository.

Ten minutes from a checkout to a rendered scene in your library. Nothing here needs a signed-in browser until the last step.

#Build

Node 22 or newer.

bash
pnpm -C apps/cli build
alias puni="node $PWD/apps/cli/bin/run.js"
puni --help

#Make a scene

bash
puni contract --json
puni studies list --json
puni scene create --study soft-guest --output scene.json --json
puni scene inspect --file scene.json --json

contract prints the commands and types a scene is made of. studies are starting scenes; soft-guest is a small soft character.

#Change it

Write edits.json:

json
[
  { "type": "rename", "name": "Quiet guest" },
  { "type": "set-instance", "id": "body", "properties": { "color": "#819ad5" } }
]
bash
puni checkpoint create --file scene.json --name Before --output before.json --json
puni scene apply --file scene.json --commands edits.json --overwrite --json
puni scene evaluate --file scene.json --time 1 --json

A failed batch leaves the file untouched. The checkpoint is there if you want the old colour back.

#Render it

bash
puni render png --file scene.json --output scene.png --time 1 --width 800 --height 800 --json

This needs a browser and nothing else: an installed Chrome, or the Chromium a terminal run offers to download the first time. The envelope names the file, its size and its SHA-256.

#Push it to your library

bash
puni auth login --base-url https://puni.design
puni project create --file scene.json --base-url https://puni.design --json

Type the code it prints on the page it opens, then approve. The scene appears in your library, with the same objects and motion, ready to open in the studio.

#Done when

scene.png shows a blue guest, and the scene is in your library with revision 1.

Continue with Setup for the renderer and the environment, or the command reference for every flag.

Was this useful?