same.yaml file is the core configuration file for a project in same. It defines the project metadata, available tools, and the tasks that can be executed.
Schema
version
The version of the configuration schema. Currently, the only supported version is “1”.
project
The name of the project. This is used for namespacing tasks when referenced from other projects or the workspace root.
tools
A map of tool aliases to their Nix package specifications. These tools are available to be used by tasks within this project.The key is the alias (e.g.,
go, lint) and the value is the Nix package specifier (e.g., [email protected], golangci-lint).tasks
A map of task definitions. The key is the task name (e.g.,
build, test).Task Definition
Each entry in thetasks map defines a specific unit of work.
input
A list of file glob patterns that are inputs to this task. Changes to these files will invalidate the task’s cache.Examples:
["src/**/*.go"], ["go.mod"], ["cmd", "internal"]cmd
The command to execute. This is an array of strings representing the command and its arguments.
target
A list of output files or directories that this task produces. These are the artifacts generated by the command.
tools
A list of tool aliases (defined in the top-level
tools section or inherited from the workspace) that this task requires.dependsOn
A list of other tasks that this task depends on. The
same scheduler ensures these dependencies are executed successfully before running this task.Dependencies can be:- Local tasks:
build - Cross-project tasks:
lib:build
environment
A map of environment variables to set for the task execution.
workingDir
The working directory for the command execution, relative to the project root.
rebuild
Controls when the task should execute.
on-change(default): Execute only if inputs have changed (cache-based)always: Execute on every run, bypassing the cache
always for tasks that produce non-deterministic outputs (e.g., timestamps, fetching external data, debugging).Note: Downstream tasks still honor their own rebuild strategy. If an “always” task produces identical outputs, dependent tasks with on-change won’t re-execute.Example
same.yaml