Bundles

A bundle is one file that carries a template together with the Rive files it plays, so a template moves between Macs without breaking. Use it to share a design, back it up or move it to another app.

A bundle is a zip archive with this layout:

text
bundle.json          the format name, the template's name and app, and the list of asset files
template.json        the template, as the template store writes it
assets/<file>.riv    every Rive file a rive component of the template plays

Export and import are available in the Designer (Export... and Import...), on the command line, over HTTP and as MCP tools:

shell
herald template export --app example.bidbot --name bid-bell --out bid-bell.heraldtemplate
herald template import bid-bell.heraldtemplate --app example.bidbot --keep-both

The command line and the endpoints are documented in the CLI reference and in Templates API. The MCP tools are export_template_bundle and import_template_bundle.

What export does with the animations:

  • An asset id packs the stored copy, or if there is none the file the manifest names, as <id>.riv.
  • A loose path file is packed under a free file name, and the template's path is rewritten to that name.
  • A file that cannot be found is a warning, not an error, so a template whose animation moved can still be shared.
  • Scripts and Shortcuts are not packed. The export warns about each one, because they must exist on the other Mac.

What import does:

  • It checks the template, then writes the Rive files into the target app's folder.
  • A file already there with the same bytes is reused. A different file under the same name is written as name-2.riv and the template's references are rewritten, so another template's animation never changes.
  • --app retargets the template to another app. When the template's name is taken, --keep-both (the default) saves it under a new name, --replace overwrites and --fail stops.
  • A template that references an asset still plays on a Mac whose manifest does not declare it, because the stored copy <id>.riv answers.

The archive must follow these rules, which a Finder archive already does:

RuleValue
CompressionStored or deflate. No zip64, no encryption.
EntriesAt most 80, each at most 10 MB, 64 MB in total.
template.jsonAt most 2 MB.
NamesA name that climbs out of the archive is rejected. A wrapper folder and __MACOSX entries are accepted.

Edit this page on GitHub

Esc
Getting started
Guides