mise generate tool-stub
- Usage:
mise generate tool-stub [FLAGS] <OUTPUT> - Effect: modifies state
- Source code:
src/cli/generate/tool_stub.rs
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 archiveIf not specified and the archive is downloaded, mise detects the most likely binary.
--bootstrap— Make the stub install mise when it is missingThe stub becomes a bash script that:
- Uses mise from PATH, or ~/.local/bin/mise
- Otherwise installs mise to ~/.local/bin with the embedded installer
- Runs the tool stub with mise
--bootstrap-version <BOOTSTRAP_VERSION>— mise version the --bootstrap script installs; defaults to the latest releasePin a version such as
2026.10.0to keep the installer reproducible.--checksum-algorithm <ALGORITHM>— Checksum algorithm for downloaded artifactsNot available with --lock or --skip-download, which do not compute checksums.
Choices:
blake3,sha256Default:
blake3--fetch— Fetch checksums and sizes for an existing tool stub fileReads 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 stubThe data goes into the
mise.lockof 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 aslinux-x64:bin/tool; repeatable--platform-url <PLATFORM_URL>— Download URL for one platform, asPLATFORM:URLor a bare URL; repeatableWith 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 toolDefault:
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.gzAdd 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.gzDraft 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-downloadFill missing checksums and sizes in an existing stub
mise generate tool-stub ./bin/node --fetchResolve and record the version and platform lock data of an existing registry-backed stub
mise generate tool-stub ./bin/registry-node --lock --version 24