Skip to content

Minimal CLI Reference

Global Flags

FlagShortDescription
--repo-dir <PATH>-CUse the given directory as the repository root instead of searching from cwd
--minimal-dir <PATH>Override the base directory used for operations (default: ~/.cache/minimal)
--no-cacheIgnore locally-available binary artifacts (forces rebuilds unless present in remote cache)
--no-fetchDo not fetch binary artifacts from the internet
--num-parallel-builds <N>-jConfigure the number of parallel builds

Commands

run <TASK_NAME> [<args>]

Runs a task specified in minimal.toml. (Linux only)

shell

Launches a development shell. Shorthand for minimal run shell.

build

Runs the build task. Shorthand for minimal run build.

test

Runs the test task. Shorthand for minimal run test.

update

Refreshes local checkouts of upstream packages and the standard library.

add <PACKAGES...>

Add a new tool or dependency. Requires exactly one of:

FlagDescription
--runtimeAdd as a runtime dependency
--buildAdd as a build dependency
--task <TASK_NAME>Add to a task's package list

init

Automatically initialize Minimal configuration based on your source tree.

FlagShortDescription
--yes-ySkip confirmation, write configuration based on auto-detection

status

Shows the status of Minimal in this codebase.

package <PACKAGES...> (alias: pkg)

Builds specified package(s) in a clean room, making them available in the local cache. If no packages are specified, Minimal will build packages from local origin.

FlagShortDescription
--verbose-vLog stdout/stderr during the build

materialize <OUTPUT_NAME>

Materializes an output defined in an [outputs.<name>] section of minimal.toml.

FlagShortDescription
--output <PATH>-o(required) The output file to write
--arch <ARCH>Target architecture for OCI images (e.g. amd64, arm64). Overrides the arch field in minimal.toml and the host default

Supported output types:

  • oci-image — a Linux OCI image archive containing the configured packages, suitable for docker load or pushing to a registry.

See [outputs.*] for the full configuration schema.

check [FILTER_NAMES...]

Validates Minimal's configuration including packages, harnesses, and profiles.

FlagShortDescription
--fix-fAttempt to fix any issues
--skip-checkers <NAMES>-sComma-delimited checker names to skip
--packagesCheck packages defined in the codebase
--harnessesCheck harnesses defined in the codebase
--profilesCheck profiles defined in the codebase

If no type flags are specified, all types are checked by default.

If filter names are specified, any package, harness, or profile matching a specified name is checked.

dep [PACKAGES...]

Generates a dependency graph visualization.

FlagShortDefaultDescription
--excludes <PKGS>-eComma-delimited packages to exclude
--build-spec-depstrueInclude build spec "build_deps"
--source-depsfalseInclude source code "build_deps"
--local-depsfalseInclude local (build.sh) "input" deps
--hostpath-depsfalseInclude host path "build_deps"
--needsfalseInclude "Needs" nodes and edges
--providesfalseInclude "Provides" edges and "Needs" nodes
--bootstrapfalseInclude replace-on-cycle/prebuilts/bootstrap
--subtrees-onlyfalseRequire non-zero subtree deps for runtime/input deps
--input-deps-depth <N>-1How deeply input dependencies are followed (-1 = all)
--runtime-deps-depth <N>-1How deeply runtime dependencies are followed (-1 = all)
--prune-edgelessfalseDiscard graph nodes with no edges
--output-format <FMT>dotOutput format: dot or mermaid

cache clean

Remove cache entries that haven't been used recently.

FlagDefaultDescription
--older-than <DURATION>14dDuration string (e.g. 7d, 24h, 30m)

completions <SHELL>

Generate shell completion script. Supported shells: bash, zsh, elvish, fish.

Usage: source <(minimal completions bash)

Environment Variables

VariableDescription
RUST_LOGControls logging level (default: info)