Rive CLI 1.4.0
This release brings Libraries to the CLI. A project made from a file that imports libraries now builds with everything it needs. Before, it failed to build and the viewer showed nothing. rive . --android puts your project on an Android phone or emulator and updates it as you save, Luau scripts can download data with fetch(url) when you run with --allow-net, and the VS Code debugger can now show and change your view models and stop when one changes. Update with rive update (curl install) or brew upgrade --cask rive-cli.
Libraries
📚 Libraries come with the project: a library is content published in the editor that other files import, like artboards, state machines, view models, scripts and shaders. rive create --from-remote-file and rive pull now download every library the file uses, including the ones other libraries import, into a .libraries folder, and list the direct ones under libraries: in rive.yaml. A library that fails to download leaves its parts out, as in the editor, instead of stopping the build. rive push still pushes only your project. Commit .libraries so a teammate can build without pulling, but don't edit inside it: the next pull replaces it.
🔗 Work on a library and the file that uses it together: add override: ../palette to a library's entry in rive.yaml and the build uses that local project instead of the downloaded copy, so you can change both without publishing in between. rive pull keeps your override. Adding a library or moving to a newer version is still done in the editor.
Android devices
📱 Preview on Android: rive . --android installs the Rive player on the first connected Android device and sends it every build as you save. --android=<name> picks a device by adb serial or emulator name, and starts the emulator if it isn't running (arm64 emulators only). Each finger is its own pointer, so multitouch works. When adb is missing, the CLI offers to download Google's platform tools. The player draws with Vulkan by default, and --device-backend=gl switches it to OpenGL. Not available on Windows yet.
Debugging
🔍 View models in the debugger: the Rive VS Code extension has a new View Models panel under Run and Debug. It lists the artboard's view model and every global one, and refreshes while the preview runs. Change a number, string, boolean, color or enum from there, or fire a trigger. When a script stops, the Variables panel also shows a View Models scope beside Locals and Upvalues.
🛑 Break on Value Change: right-click a view model value in Variables and pick Break on Value Change, or press the breakpoint button beside it in the View Models panel. The preview stops at the script line that wrote the value. When a listener or a data bind wrote it, the call stack names that instead, like Listener 'Tap' and the state machine and artboard it belongs to. The stop message shows the change, like Main/stats/bursts: 0 → 1.
Headless input
👆 Touch: --touch=<kind[:id]@x,y> synthesises a finger (down, up, move or tap), each id its own pointer. drag@x1,y1>x2,y2+x3,y3>x4,y4 moves several fingers in the same frames, for pinches and two-finger swipes. Before, headless input had a single pointer.
🖱️ Mouse wheel and trackpad: --pointer takes wheel@x,y:dx,dy and trackpad@x,y:dx,dy. A trackpad swipe ends in the same fling on every run, so captures match. A scroll that nothing takes now says so, where before the capture just showed a list that hadn't moved:
wheel: nothing at 200,300 scrolled. No scroll view under it can move that way, or its wheelInteractive is off
Scripting
🌐 fetch in Luau scripts: fetch(url, options) returns a Promise<Response> when you run the CLI with --allow-net. Without it, or anywhere outside the CLI for now, requests reject with disabled. Only https works; IP addresses, local network names and Rive's own hosts are refused, and size, timeout and per-minute limits apply. macOS only for now. To load a downloaded .riv, context:decodeFile(bytes) decodes it and file:bindableArtboard(name) gives an artboard you can assign to a view model artboard property. Only its embedded assets load.
🖲️ Scroll in scripts: a script can take mouse wheel and trackpad scroll with a new pointerScroll(self, event) method. Call event:hit() to keep the scroll; otherwise it passes to the scroll view behind. Scripts without pointerScroll never take scroll.
📐 2D vectors have z = 0: every 2D vector a script receives (pointer positions, node position and scale, gamepad sticks) now has z = 0. Before, z could hold a leftover value, so length() came out too long and Vector.xy(1, 2) == Vector.xy(1, 2) was sometimes false.
🧮 WGSL aliases in shaders: uniform structs can use mat2x2f through mat4x4f, their h forms, and vec2h through vec4h. Before, the shader check rejected them.
⏱️ --bench times what you publish: --bench=<frames> now compiles scripts the way a publish does, and the build log says so. Before, it timed the preview build, which compiles Luau at a lower optimization level.
RML (the markup the CLI compiles)
⭕ Inner and outer strokes: position on <Stroke> takes inside, center or outside. It defaults to center and is only written when it differs, so existing files don't change, and runtimes that don't support it yet draw the stroke centered. In the editor, inner and outer strokes are in Early Access.
🏷️ Names instead of numbers: markup written by rive pull, rive create --from-remote-file and --from-rev now uses names, blendModeValue="softLight" instead of blendModeValue="21", and <KeyedProperty property="rotation"> instead of propertyKey="15". You can write property by hand too; a name that doesn't exist gets a "did you mean" error. Markup with numbers still compiles.
Viewer
📜 Virtualized scrolling in grids and wrapping layouts: virtualize on a scroll view now works in grid and wrapping layouts, in one or both directions. Before, it only worked on a list in a single row or column. A virtualized grid that hugs its content now sizes to all of its rows.
🔔 A trigger fired by a nested state machine now reaches every state machine that listens for it. Before, it could be cleared before a sibling checked it, so the sibling never took its transition.
🔘 A transition now sees a value that a listener action just wrote. Before, it read the old value, so a button could need two clicks.
✏️ Text inputs behave like platform text fields: the caret hides while text is selected, a click past the end of the text moves the caret to the end, and undo catches the first edit in an empty field.
😀 Color emoji from COLRv1 fonts, like Android's system emoji, draw their gradients. Before, those parts drew solid black.