same
Write Once, Build Once, Anywhere
same is a modern build tool for monorepos designed to make execution hermetic,
deterministic, and fast across any environment.
- Reliable: Deterministic builds via Nix ensure that if it runs on your machine, it runs on any other machine and on CI.
- Simple: Minimal configuration with a clean, uncluttered CLI and TUI.
- Fast: Snappy execution with aggressive content-addressable caching and parallel scheduling.
Use same if you struggle with:
- Inconsistent builds: "It works on my machine" but fails on CI due to environmental differences.
- Complex setups: Onboarding new developers takes hours installing specific compilers and tool versions.
- Slow CI: Rebuilding the entire project for a one-line change.
same helps by:
- Locking toolchains: Uses Nix to ensure every developer and CI runner uses the exact same binary versions.
- Caching everywhere: Computes input hashes to skip work that has already been done.
- Unifying execution: One syntax (
same run) for all tasks, regardless of the underlying language (Go, Rust, Node, etc.).
same is currently in v0 (Beta).
- Breaking Changes: The configuration schema (
same.yaml) and CLI commands may change as we refine the design. - Production Use: While reliable for development workflows, please pin versions in your CI pipelines.
same is built and tested for the following operating systems and
architectures:
| OS | Architectures |
|---|---|
| Linux | amd64, arm64 |
| macOS | amd64 (Intel), arm64 (Apple Silicon) |
Note: Windows is not supported at this time.
Add same to your flake.nix to ensure your team uses the exact same version:
{
inputs.same.url = "github:traiproject/same";
outputs = { self, nixpkgs, same }: {
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
buildInputs = [ same.packages.x86_64-linux.default ];
};
};
}Install directly into your profile:
nix profile install github:traiproject/sameInstall via our official tap:
brew install traiproject/tap/sameor
brew tap traiproject/tap
brew install sameBinaries and packages are available on the Releases page.
Debian / Ubuntu ( .deb )
curl -LO https://github.com/traiproject/same/releases/download/v0.0.1/same_0.0.1_linux_amd64.deb
sudo dpkg -i same_0.0.1_linux_amd64.debFedora / RHEL ( .rpm )
curl -LO https://github.com/traiproject/same/releases/download/v0.0.1/same_0.0.1_linux_amd64.rpm
sudo rpm -i same_0.0.1_linux_amd64.rpmAlpine Linux ( .apk )
curl -LO https://github.com/traiproject/same/releases/download/v0.0.1/same_0.0.1_linux_amd64.apk
apk add same_0.0.1_linux_amd64.apkNote: Binary archives (
tar.gz) are available for macOS (Intel/Apple Silicon) and Linux (amd64/arm64).
-
Initialize configuration
Create a same.yaml in the root of your project:
version: "1" # Define tools needed for your tasks (provisioned via Nix) tools: go: go@1.25.4 lint: golangci-lint@2.7.2 tasks: # Define a task build: input: ["cmd", "internal", "go.mod"] cmd: ["go", "build", "-o", "bin/app", "./cmd/main.go"] target: ["bin/app"] tools: ["go"] # Define a dependent task lint: input: ["**/*.go"] cmd: ["golangci-lint", "run"] tools: ["lint"] dependsOn: ["build"]
-
Run a task
same run lint
The same.yaml file drives the execution engine.
version: Configuration format version (currently "1").project: (Optional) Name of the project, only required if using a workspace setup.tools: A map of tool aliases to versions (e.g.,go: go@1.23).sameuses Nix to provide these hermetically.tasksA map of task names to task definitions.
Task Definition:
input: List of file globs or paths that affect the task output. Used for caching hash calculation.cmd: The command to execute (as a list of strings).target: List of output files or directories the task produces.tools: List of tool aliases (defined in the globaltoolssection) required by this specific task.dependsOn: List of other tasks that must complete successfully before this task runs.environment: Map of environment variables injected into the task execution.workingDir: Directory to execute the command in. If a relative path is provided, it is relative to the project root (the directory containing same.yaml). Defaults to the project root.