DemoFlowOpen app

Runner

You can pair a machine with your DemoFlow account and keep it connected, so the website shows it online. Nothing here is needed to make videos: every other command works without an account. With the runner connected, the site can also start runs on the machine and delete a run's files.

Pair a machine

npx demoflow login

The command prints a code such as ABCD-1234 and opens <server>/app/device?code=ABCD-1234. Check that the code matches your terminal, then approve it while signed in with a verified email. Over SSH with no browser, open <server>/app/device yourself and type the code. The code expires after 10 minutes.

Keep it connected

npx demoflow runner start

The runner is a background process that holds one connection to the server. After login, the CLI asks whether to start it; --start and --no-start answer in advance, and with no terminal it only prints the command.

CommandWhat it does
demoflow runner startStart the runner. A second start prints the PID of the one running.
demoflow runner stopStop it. logout stops it first.
demoflow runner statusShow whether it runs, its connection, the server and whether autostart is installed. --json prints one object.
demoflow runner logsPrint the runner's log. -f or --follow keeps printing.
demoflow runner installStart the runner at every login, and now.
demoflow runner uninstallStop starting it at login. A running runner keeps running until stop.

The connection is connected, reconnecting in Ns or revoked. When it drops, the runner reconnects with a backoff from 1 second doubling to 60. It exits for good if the machine is revoked on the website. Every 30 days the server rotates the token over the connection and the runner rewrites credentials.json.

Start at login

npx demoflow runner install

This registers the runner for your user, with no admin rights, and starts it now. It needs demoflow login first. The unit runs the same node and CLI that ran install, by absolute path, so run install again if you move or upgrade the CLI.

OSWhat it creates
Linuxa systemd user unit, ~/.config/systemd/user/demoflow-runner.service
macOSa LaunchAgent, ~/Library/LaunchAgents/dev.demoflow.runner.plist
Windowsa Task Scheduler task, DemoFlowRunner, at logon for the current user

A crash is restarted by systemd and launchd. A runner stopped on purpose, or revoked on the website, stays down. Windows does not restart a crash; the next logon starts it again. Neither unit holds the token.

Runs started from the website

On a project's page, the Run a scenario card starts a scenario on the machine the project is bound to. The card makes no request when the project has no folder or its machine was removed.

Which scenarios are listed

What the site chooses

The site sends the scenario's path and, if you choose, the output formats. Nothing else. The machine starts an ordinary demoflow run of that file with the project's own demoflow.config.json, its own devCommand and the runner's environment. The run is always headless. Size, frame, background and every other render setting come from demoflow.config.json.

By default the site sends no formats and the run makes the project's formats. Choose formats on the card picks any of the nine instead. A machine with an older CLI offers no choice: the card says to update the CLI, and the run makes the project's formats. Run again repeats the formats the run rendered; if the run rendered none, or the CLI is older, it uses the project's formats.

valueFrom.env secrets come from the runner's environment, which an autostart unit may not share with your shell.

Starting

Run asks for confirmation, naming the scenario and the machine. It is refused when:

While it runs

The status row shows Starting, Running, Cancelling, Passed, Failed, Cancelled, Timed out or Lost contact.

While a run is going, the card also shows what the machine is doing: starting the app, which step of how many it is on, or rendering the video. A machine with an older demoflow shows only Running.

When it ends

Delete a run's files

On a run's page, Delete video files removes the run's files from the machine that recorded it. It asks for confirmation, naming the machine. The button shows only while the run has video formats and is not deleted yet.

Status on the site

Signed in, open Machines in the app. Each paired machine is listed with its name and a status dot: online while its runner is connected, otherwise offline, with when and from which address it was last seen. You can rename a machine or revoke it there.