Skip to content

Harnesses

Harnesses wire Minimal to operate a codebase with specific tools and commands. When you name a harness in your minimal.toml file, high-level commands like minimal build just work. Additionally, your tasks inherit these familiar tools and semantics automatically.

Learn more about harnesses in the reference section.

Available harnesses

The Minimal Public Package Registry ships harnesses for most common languages and build systems:

HarnessDetected byBuild command
gogo.mod + go.sumgo build
rustCargo.tomlcargo build --release
pnpmpnpm-lock.yamlpnpm install && pnpm build
npmpackage-lock.jsonnpm ci && npm run build
bunbun.lockbun install && bun run build
denodeno.jsondeno compile
uvuv.lock, pyproject.tomluv sync && uv build
piprequirements.txt, setup.pypip3 install --target ./build .
gradlebuild.gradlegradle build -x test
makeMakefile./configure && make
mesonmeson.buildmeson setup && ninja
cmakeCMakeLists.txtcmake && make
zigbuild.zigzig build -Doptimize=ReleaseSafe

Using a harness

Harnesses are declared in the [harness] section of your minimal.toml file.

toml
[harness]
use = "<harness name>"

Any harness defined in your codebase (or defined in any layer in your software supply chain) can be used.

When a harness is defined, any task will inherit the packages, default tasks, and other wiring declared in the harness.

Declaring additional dependencies

It's quite common for a specific codebase to need additional dependencies, either during the build (build packages) or on any system the built software runs (runtime packages). Both can be declared in your minimal.toml:

toml
[harness]
use = "..."
build_packages = ["perl"]
runtime_packages = ["openssl"]

Dependencies can also be added automatically using the minimal add command.

Automatic initialization

Minimal will auto-detect the harness to use for most languages and package managers. To have the Minimal CLI detect an appropriate harness and pre-fill your codebase's minimal.toml file, run minimal init in the root directory.