Skip to content

Knobs

The toolchain has two tiers of configuration.

Tier Where Examples
Structural (set once per repo) root mise.toml [vars] app, goos, node_package_manager, grype_fail_on
Per-invocation (runtime) environment variables VERSION, GOOS, FUZZ, NODE_PACKAGE_MANAGER

Structural knobs have defaults in the library's config.toml [vars], and the repo's root mise.toml [vars] overrides them. Task files reference them as {{vars.name}} and pass them to scripts as environment variables (usually TOOLCHAIN_*, which keeps the plain spellings free for per-run overrides).

Structural knobs

Knob Default Archetype Meaning
license_holder BitWise Media Group Ltd all but terraform Copyright holder addlicense writes. Don't vary the spelling per repo.
app empty (repo directory name) go Output binary name.
app_pkg . go Main package to build.
build_tags empty go Extra build tags, for example withui.
version_pkg empty (<module>/internal/version) go Package declaring Version, Commit and BuildDate.
goos empty (host GOOS) go Space-separated GOOS list that lint and test cover.
node_package_manager empty (auto-detect) node npm, pnpm or bun.
node_install_flags --ignore-scripts node Flags for the locked install. An action repo sets "".
npm_ci_flags unset node Deprecated. npm-only install flags; win over node_install_flags when set.
swift_product empty (every product) swift Product build builds, and the GoReleaser shim's fallback product.
terraform_binary terraform terraform tofu for OpenTofu (pin opentofu in root [tools] too).
grype_fail_on high all Minimum grype severity that fails the Dockerfile base-image scan.
kubescape_severity high all Minimum kubescape severity that fails the helm and kustomize scans.
zizmor_min_severity low all Lowest zizmor finding severity that fails lint.

Severity knobs take low, medium, high or critical (zizmor also accepts unknown and informational).

Per-invocation variables

Make exports command-line variables to the forwarded mise run, so make build VERSION=1.2.3 and VERSION=1.2.3 mise run build are the same.

Variable Archetype Default Meaning
VERSION go git describe --tags --always --dirty Version stamped into the binary.
COMMIT go git rev-parse --short HEAD Commit stamped into the binary.
DATE go current UTC time Build date stamped into the binary.
LDFLAGS go -s -w -X …Version … -X …Commit … -X …BuildDate … Replaces the whole ldflags string.
MODULE go go list -m Module path used to derive version_pkg.
GOOS go the goos knob GOOS list for one lint or test run.
FUZZ go .* (the package's only fuzz test) Fuzz target name.
FUZZTIME go 20s Fuzz duration.
FUZZ_PKG go ./... Package to fuzz. Must name exactly one.
APP, APP_PKG, BUILD_TAGS, VERSION_PKG go the knob Per-run overrides of the structural knobs.
NODE_PACKAGE_MANAGER node the node_package_manager knob Force a package manager for one run.
NODE_INSTALL_FLAGS node the node_install_flags knob Install flags; set-but-empty forces a bare install.
NPM_CI_FLAGS node — Deprecated. npm-only install flags.
SWIFT_PRODUCT swift the swift_product knob Product for one build run, or a GoReleaser build's product.
SWIFT_TEST_FLAGS swift — Extra swift test flags, for example --sanitize=thread.
ENTRY containers every entry (--all) Entries to build, validate or publish, space-separated; mirror-add's new entry name.
REGISTRY containers every registry Registries build, publish and mirror-publish reach, space-separated.
URL containers — The upstream mirror-add scaffolds from. Required there.
VERSION containers the release-please manifest, the newest vX.Y.Z tag, or 0.0.0 Base version for patchy build tag templates.
GIT_COMMIT containers git rev-parse HEAD Commit for patchy build tag templates and annotations.
SOURCE_DATE_EPOCH containers the HEAD commit's time Reproducible buildx output; the source of ${PATCHY_TIMESTAMP}.
KUBECONFORM_SCHEMAS containers tests/schemas Vendored CRD schemas for scripts/kubeconform.sh.
KUBECONFORM_SKIP containers CustomResourceDefinition Kinds scripts/kubeconform.sh skips; empty skips none.
GH_TOKEN all — Enables zizmor's online-only audits when exported.

The defaults, as shipped

This is the live [vars] section of config.toml, embedded when the site is built:

[vars]
# Canonical copyright holder for the whole ecosystem. Do not vary the spelling
# per repo — a single value here is the point. Override only if a repo genuinely
# needs a different holder.
license_holder = "BitWise Media Group Ltd"
# go: output binary (empty = repo directory name) and main package.
app = ""
app_pkg = "."
# go: extra build tags (e.g. an embedded UI: build_tags = "withui").
build_tags = ""
# go: package declaring Version/Commit/BuildDate (empty = <module>/internal/version).
version_pkg = ""
# go: space-separated GOOS list that lint and test cover (e.g. a cross-platform
# CLI: goos = "linux darwin windows"). Empty = the host's GOOS only. Each entry
# gets its own golangci-lint + govulncheck pass; test runs the full suite on the
# host's GOOS and compile-checks the test binaries for every other entry
# (cross-compiled tests cannot execute). GOOS in the environment overrides per
# invocation (`make test GOOS=windows`).
goos = ""
# node: package manager — npm, pnpm or bun. Empty = auto-detect from
# package.json "packageManager", then the lockfile, then npm. Set it when a
# repo carries lockfiles from more than one manager. NODE_PACKAGE_MANAGER in
# the environment overrides per invocation.
node_package_manager = ""
# node: flags for the locked install (npm ci / pnpm install --frozen-lockfile /
# bun install --frozen-lockfile). --ignore-scripts is the safe default for a
# library (npm also always gets --no-fund); a GitHub Action repo that relies on
# lifecycle scripts sets node_install_flags = "" in its root [vars].
# NODE_INSTALL_FLAGS in the environment overrides per invocation (unset-only,
# so NODE_INSTALL_FLAGS= forces a bare install).
node_install_flags = "--ignore-scripts"
# node: npm_ci_flags is the deprecated npm-only spelling of node_install_flags
# and deliberately has no default here. A repo that still sets it (e.g.
# npm_ci_flags = "") gets exactly those flags for `npm ci`, as does
# NPM_CI_FLAGS in the environment; both are ignored for pnpm and bun.
# swift: product to build (empty = every product); the snapshot/release shim
# also falls back to it when a GoReleaser build names no SWIFT_PRODUCT.
# SWIFT_PRODUCT in the environment overrides per invocation.
swift_product = ""
# terraform: which binary the terraform archetype drives — set to "tofu" in
# an OpenTofu repo (and add the opentofu pin to that repo's root [tools]; the
# shared [tools] only pins terraform). Secrets/env injection is not a knob:
# tf-run.sh always wraps the state-touching tasks and engages fnox only when
# the module directory carries a fnox.toml.
terraform_binary = "terraform"
# container/deploy lint: minimum severity that fails the gate — grype
# --fail-on for Dockerfile base images, kubescape --severity-threshold for
# helm charts and kustomize directories. low|medium|high|critical.
grype_fail_on = "high"
kubescape_severity = "high"
# workflow lint: lowest zizmor finding severity that fails `lint`
# (unknown|informational|low|medium|high). Repos silence accepted findings
# with a zizmor.yml (auto-loaded from the repo root or .github/).
zizmor_min_severity = "low"