Tuist
Tuist lets Once share cache entries and execute commands across machines. Start with the cache, verify that another checkout can reuse a result, then add remote execution if the project needs it.
Configure The Cache
Add a Tuist provider and cache binding to the repository root once.toml:
[infrastructures.tuist]
kind = "tuist"
account = "acme"
project = "app"
[infrastructure.cache]
provider = "tuist"Replace acme and app with the Tuist account and project that should own the shared entries.
Authenticate A Developer Machine
Sign in once:
once auth login --provider tuistOnce reuses the stored session for cache reads and writes. Remove it when the machine should no longer access the provider:
once auth logout --provider tuistVerify A Shared Result
Use two machines with the same once.toml, script, and input. On the first machine, run the example scripted workflow:
./scripts/greet.shThe first run reports a cache miss. On a second machine whose local cache has not seen this result, create the same message.txt and run the script again:
printf 'hello from Once\n' > message.txt
./scripts/greet.shThe second machine should report a cache hit and restore build/greeting.txt. Because its local cache has no matching entry, the hit confirms that Tuist supplied the recorded result.
Authenticate Automation
Choose the authentication method supported by the environment.
Account Token
Set TUIST_TOKEN to a Tuist account token with cache access when the runner can store a long-lived secret:
TUIST_TOKEN=tuist_... ./scripts/greet.shOpenID Connect
Use OpenID Connect on a supported automation runner. Log in without opening a browser before running cacheable commands:
once auth login --provider tuist --no-browser
./scripts/greet.shOn GitHub Actions, grant identity-token permission before the login step:
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6
- run: once auth login --provider tuist --no-browser
- run: ./scripts/greet.shThe resulting session remains available for the rest of the job.
Add Remote Execution
Bind execution to the same provider when commands should run through Tuist:
[infrastructure.execution]
provider = "tuist"
project = "preview-execution"The project override is optional. It lets cache and execution use different Tuist projects while sharing the provider's account and authentication.
Run a command remotely with the configured provider:
once exec --remote -- bash scripts/greet.shNext
Read Memory to inspect the status, cache state, and action identity that Once records for each run.
