Skip to content

tuist/once

Repository files navigation

Once: Run once. Reuse everywhere.

CI Latest release License

Once

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.

Quick Start

Describe a script with # once annotations:

#!/usr/bin/env bash
# once input "../assets/**/*"
# once output "../dist/"
# once cwd ".."

npm run build-assets

Run it through the cache:

once exec -- bash scripts/build-assets.sh
once exec --remote --compute microsandbox -- bash scripts/build-assets.sh

Scripts can also run directly with a Once shebang:

#!/usr/bin/env -S once exec -- bash

Documentation

Read the documentation at once.tuist.dev.

Integrations

Use the once crate when embedding Once in Rust applications:

[dependencies]
once = { git = "https://github.com/tuist/once" }

Release builds also publish Once.xcframework.zip for Apple platforms. The framework exposes a small C ABI that Swift and Objective-C can call, with JSON requests and responses for cache access.

License

MIT.

About

Run once. Reuse everywhere.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors