Once makes project scripts cacheable, observable, and remotely executable. Declare the inputs, outputs, environment, and runtime contract once, then reuse the result locally, in CI, or on a compute provider.
Declare a script in once.toml:
[[script]]
name = "build-assets"
argv = ["bash", "scripts/build-assets.sh"]
input = ["scripts/build-assets.sh", "assets/**/*"]
output = ["dist/"]Run it through the cache:
once run build-assets
once run build-assets --remote --compute microsandboxScripts can also describe themselves with ONCE headers and run directly:
once exec --script bash scripts/build-assets.shRead the documentation at once.tuist.dev.
MIT.
