Build consistently. Keep the build simple.
xx is a build system for projects that want more consistency than a collection of shell scripts without adopting a large, fully hermetic build environment.
Build definitions are small Starlark files. They declare tools, environment changes, and commands. xx provisions versioned tools, gives each task a clean environment, and runs independent work concurrently.
xx is not fully hermetic. It deliberately chooses a practical middle ground: reproducible tool versions and controlled task environments, with familiar files and commands.
Why xx?
- Versioned tools: A build declares Go or Node.js versions instead of relying on globally installed tools.
- Small configuration: Build files use readable Python-like Starlark.
- Clean task environments: Tasks start from an operating-system environment, then apply declared dependencies in order.
- Portable builds: The same build definition works on supported Windows, Linux, and macOS systems.
- Shared setup work: A requested tool version is provisioned once and reused by tasks that need it.
Managed Go and Node.js language packages are supported. More language and tool packages can be added without changing the core model.
Install
Install xx from source:
go install codeberg.org/tsukinoko-kun/xx@latest
This requires Go. Linux and macOS builds also need a C compiler when Go enables CGO. In a POSIX shell, CGO_ENABLED=0 go install codeberg.org/tsukinoko-kun/xx@latest builds without a C compiler. Projects using xx can request their own managed Go SDK version.
First Project
From a project directory, initialize xx:
xx init
This creates .xx/main.star. Entrypoints live in .xx/ and can use .star, .build, .starlark, .bzl, or .bazel as their extension.
For a Go program in main.go, use:
load("@go@1.26.5", "go_binary")
go_binary(
entry_point="main.go",
flags=["-trimpath"],
)
Run the entrypoint by its base name:
xx run main
xx downloads the requested official Go SDK when it is not cached, then writes the binary to .xx/out/main (.xx/out/main.exe on Windows).
Where Next?
- Read Built-in packages for complete package APIs.
- Start with Go examples for common build patterns.
- Read Node.js examples for npm, npx, and direct Node.js patterns.
- Read Command examples for task and environment patterns.
Project Status
xx is early software. Managed Go and Node.js packages support Windows x86-64, Windows ARM64, Linux x86-64, Linux ARM64, and macOS ARM64.
Source and issue tracking are on Codeberg. xx is available under the Zlib License.