Once turns repository automation into typed, cacheable actions that humans and coding agents can discover, run, and reuse.
Install the current release with mise:
mise use -g "github:tuist/once@$(mise latest github:tuist/once)"
mise exec -- once --versionUse mise use github:tuist/once@... inside a repository when the project
should pin Once in its own mise.toml.
Once includes a Model Context Protocol (MCP) server. Add it to a coding harness that supports servers over standard input and output, and start it through mise so global installs and project pins both work:
{
"mcpServers": {
"once": {
"command": "mise",
"args": [
"-C",
"/absolute/path/to/your/project",
"exec",
"--",
"once",
"mcp",
"--workspace",
"/absolute/path/to/your/project",
"--allow-run"
]
}
}
}
Remove --allow-run if the harness should not edit manifests, build, test,
run, or start runtime sessions.
For a brand-new Rust project, also pin Rust in the project:
mise use rust@1.96.0Then ask the harness:
Use Once to initialize this directory as a Rust binary package. Discover the
available target kinds, fetch the Rust binary starter, create the files, and
build the target.
The harness can discover rust_binary, fetch the rust-binary-with-crate
starter with once_query_example, write the files, validate the complete graph
with once_validate_workspace, and verify the result with once_build_target.
The same live discovery loop supports a request such as “build an Android app with Once.” See the coding harness guide for typed graphs, annotated scripts, result checks, and project memory.
Add a small contract to an existing script so Once knows the inputs, outputs, environment, and working directory that shape the action:
#!/usr/bin/env bash
# once input "../assets/**/*"
# once output "../dist/"
# once cwd ".."
npm run build-assetsRun it as a cached action:
once exec -- bash scripts/build-assets.sh
once exec --remote --compute microsandbox -- bash scripts/build-assets.shScripts can also run directly with a Once shebang:
#!/usr/bin/env -S once exec -- bashRead the documentation at once.tuist.dev.