Choose between the command and the libraries

The tinyactors command handles pre-merge checks, pre-deploy diffs and offline snapshot reads without a language runtime. It also provides a workbench for scripts and agents driving hosts over JSON-RPC. Production actors run in the embeddable tinyactors libraries inside an application's process, not in the command.

Start the tutorialCheck charts in CILook up a command

The command needs no language runtime

Your application runs its actors through a library inside its own process. Checking a chart in CI, reviewing a deploy or reading a stored snapshot happens outside that process, and a script for each adds a language runtime to every build job.

A chart is an SCXML file that describes one kind of actor: its states, the events it handles and the transitions between them. A host is the runtime that runs actors from compiled charts, called an image, a .tai file. The libraries embed a host in your application, and the tinyactors command reads and runs the same charts from a shell.

The command is built from the same C libraries, and none of them carries it, so your application pays nothing for it at run time. Each tinyactors-core release ships it for Linux and macOS, and mise installs it and checks it against the release's checksums. A build job then needs no Node.js, Python or C compiler to check its charts.

Every command answers in Markdown for people, or in JSON or XML for scripts, with the same members in the same order. A CI job reads charts[0].states from the JSON that a person reads as a table.

One Linux file runs on every distribution

The Linux program is linked statically against musl, so it runs on glibc and musl systems alike. The macOS one loads only libSystem.

Source:tinyactors-core, docs/distribution.md

About 2 MB, with the host inside

The x86_64 Linux program is 2,080,424 bytes, measured on 2026-11-25. It carries the compiler, the host and the quickjs JavaScript engine.

Source:tinyactors-core, docs/distribution.md

Charts are checked before they merge

A misspelt event name compiles, and the order that waits for it waits forever. Review of the XML misses it, and booting the application's test suite to find it costs minutes on every pull request.

check compiles charts and writes nothing, and -W refuses a chart that compiles with a warning. lint reads the compiled chart without running it and reports what cannot work as written: unreachable states, dead ends, shadowed transitions and events nothing handles. fmt --check holds every chart to one canonical layout, so a diff shows only real edits.

With -W, --deny and --check, each exits with status 1 when it finds something a build should stop for, so a CI step needs no parsing. path answers which transitions lead from where an actor starts to a given state, and graph -f svg draws the chart for a review. A chart that passes them all is valid on its own, which says nothing yet about the actors already running its previous version.

Unreachable means unreachable at run time

lint lets any event come at any time and every condition hold. A state it finds unreachable stays so whatever happens when the chart runs.

Source:tinyactors-core, docs/cli.md

A failed check exits with 1

check exits with 1 on a chart that does not compile. So do lint --deny on a denied finding and fmt --check on a file to rewrite.

Source:tinyactors-core, docs/cli.md

A diff shows what a deploy does

A new version renames the state paying to charging, and the XML diff is two short lines. Orders waiting in paying would lose their place when they move to it.

After a host loads a new version of a chart, a migration moves running actors to it by state id, keeping the variables both versions declare and running no entry actions. A state the new version lacks leaves the actor in its nearest kept ancestor's initial state. tinyactors diff compares two versions as statecharts and marks each change that breaks the actors running the old one.

An added state or transition changes what actors do next and is not breaking. A removed state, a removed variable or an event a state no longer handles changes what actors hold, and diff --breaking --exit-code fails the build on those. The answer ends with what a migration would do, such as paying → open. Once a version runs, the next questions come from the actors themselves.

Breaking changes alter what running actors hold

The command lists each breaking change with what a running actor gets, from a removed state to a datamodel changed.

Source:tinyactors-core, docs/cli.md

A snapshot is read without a host

An order has waited in paying for an hour in production. Its logs tell what happened before, not which state, queued events or pending timeout the order holds now.

A host can write a snapshot, a file holding every actor it runs, and an idle actor can be written out alone as a hibernation blob for your store. tinyactors actors lists each actor of a snapshot: its chart and segment, its active states, and the events and delayed sends it waits for.

tinyactors inspect says what a snapshot or blob holds, and whether a blob wakes in the host a snapshot restores. Neither runs a chart: the command reads the library's own memory layout. That layout belongs to one build, so read a snapshot with the command of the release that wrote it. Before any host has run a chart, the command can run it too.

Nothing runs while a snapshot is read

The command restores the snapshot's memory with datamodels that do nothing, so no chart code is called.

Source:tinyactors-core, docs/cli.md

Each release reads its own formats

Snapshots and blobs are raw memory with a format version. The command reads its own library's formats and names any other.

Source:tinyactors-core, docs/cli.md

A script or an agent drives one host

An agent writing a chart needs to try it before any application code exists: spawn an order, answer its payment request, let its 30-second timeout fire. Waiting 30 real seconds per try, or writing a host program first, slows every iteration.

tinyactors run starts one host and serves JSON-RPC 2.0 on standard input and output, one message per line. The client spawns actors, sends events, answers the sends they make and moves the clock. The clock moves only when the client says so, and Math.random has a fixed seed, so the same requests print the same lines.

A server that spawns actors over JSON-RPC can look like a way to run them in production. It is a workbench: one host, one client on its standard input, charts in ECMAScript on quickjs, and a protocol that may change in any release. Production actors belong in your process, where the libraries give them your store, your I/O and your event loop.

JobWhere it belongs
Check, lint and format charts in CItinyactors check, lint, fmt
Compare a version with the deployed onetinyactors diff
Read a snapshot or a blobtinyactors actors, inspect
Draw a chart for a reviewtinyactors graph
Try a chart from a shell or an agenttinyactors run
Serve your application's trafficThe Node.js, Python or C library

The protocol is experimental

run and its protocol may change in any release until a second client uses them. tinyactors run --schema prints the schema of the release you have.

Source:tinyactors-core, docs/cli.md

A session repeats byte for byte

With a simulated clock and a fixed seed, the same requests write the same lines, trace ids included.

Source:tinyactors-core, docs/cli.md