Skip to content

mise generate tool-stub ​

Generate or update a tool stub

A tool stub is an executable file that names a tool and where to get it; running it installs the tool if needed and runs it. See https://mise.jdx.dev/dev-tools/tool-stubs.html.

Pass --url or --platform-url to create or extend a stub. mise downloads each artifact to record its checksum, size, and binary path unless you pass --skip-download. On an existing stub, new platforms are added and URLs you pass again are replaced. --fetch fills in missing checksums and sizes, and --lock records lock data for an existing stub, including one that uses a registry tool.

Arguments ​

  • <OUTPUT> — Output file path for the tool stub

Flags ​

  • -b --bin <BIN> — Binary path within the extracted archive

    If not specified and the archive is downloaded, mise detects the most likely binary.

  • --bootstrap — Make the stub install mise when it is missing

    The stub becomes a bash script that:

    1. Uses mise from PATH, or ~/.local/bin/mise
    2. Otherwise installs mise to ~/.local/bin with the embedded installer
    3. Runs the tool stub with mise
  • --bootstrap-version <BOOTSTRAP_VERSION> — mise version the --bootstrap script installs; defaults to the latest release

    Pin a version such as 2026.10.0 to keep the installer reproducible.

  • --checksum-algorithm <ALGORITHM> — Checksum algorithm for downloaded artifacts

    Not available with --lock or --skip-download, which do not compute checksums.

    Choices: blake3, sha256

    Default: blake3

  • --fetch — Fetch checksums and sizes for an existing tool stub file

    Reads an existing stub file and fills in missing checksum and size fields by downloading the files. URLs must already be present in the stub.

  • --lock — Resolve and record lock data (exact version, platform URLs and checksums) for an existing stub

    The data goes into the mise.lock of the nearest project config above the stub, and the stub keeps its version request. It is an error when no project config is found.

  • --platform-bin <PLATFORM_BIN> — Binary path inside the archive for one platform, such as linux-x64:bin/tool; repeatable

  • --platform-url <PLATFORM_URL> — Download URL for one platform, as PLATFORM:URL or a bare URL; repeatable

    With a bare URL, mise detects the platform from the file name, such as --platform-url https://nodejs.org/dist/v24.11.0/node-v24.11.0-darwin-arm64.tar.gz. When the output file already exists, new platforms are added to its platforms table, and a platform you pass again gets the new URL.

  • --skip-download — Do not download artifacts, so checksums, sizes, and the detected binary path are left out

  • -u --url <URL> — URL to download the tool from

  • --version <VERSION> — Version of the tool

    Default: latest

  • -h --help — Print help

Examples ​

Download and inspect a real archive to detect its binary and checksum

mise generate tool-stub ./bin/node --platform-url https://nodejs.org/dist/v24.11.0/node-v24.11.0-darwin-arm64.tar.gz

Add a Linux artifact to the same stub

mise generate tool-stub ./bin/node --platform-url linux-x64:https://nodejs.org/dist/v24.11.0/node-v24.11.0-linux-x64.tar.gz

Draft a stub without downloading; replace the placeholder URL before running it

mise generate tool-stub ./bin/my-tool --url https://example.com/my-tool.tar.gz --skip-download

Fill missing checksums and sizes in an existing stub

mise generate tool-stub ./bin/node --fetch

Resolve and record the version and platform lock data of an existing registry-backed stub

mise generate tool-stub ./bin/registry-node --lock --version 24
MIT LicenseCopyright © 2026jdx.dev