mise generate task-stubs
- Usage:
mise generate task-stubs [FLAGS] - Effect: modifies state
- Source code:
src/cli/generate/task_stubs.rs
Generates shims to run mise tasks
By default, this will build shims like ./bin/<task>. These can be paired with mise generate install-script so contributors to a project can execute mise tasks without installing mise into their system. When a parent and nested task both exist, the parent stub is written to <parent>/_default.
Flags
-d --dir <DIR>— Directory to create task stubs inside ofDefault:
bin-m --mise-bin <MISE_BIN>— Path to a mise bin to use when running the task stub.Use
--mise-bin=./bin/miseto use a mise bin generated frommise generate install-scriptOn Windows a path is run as written, so that script needs its own launcher beside it: generate it with
mise generate install-script --write ./bin/mise --windows. The defaultmiseis a bare name and resolves off PATH, which needs nothing extra.Default:
mise--windows-launcher <WINDOWS_LAUNCHER>— What to write beside each stub for Windows to launchcmdwrites<task>.cmd. cmd.exe re-parses the whole line before%*expands, so an argument containing& ^ | " %VAR%does not reach the task intact when the launcher is called from PowerShell.exewrites a native<task>.exeinstead, which receives its arguments unchanged from every shell. It is a copy of the mise-shim.exe that ships with the Windows build, so it can only be generated on Windows, and it adds ~220KB per task to a directory that is normally committed.Choices:
cmd,exeDefault:
cmd-h --help— Print help
Examples:
$ mise tasks add test -- echo 'running tests'
$ mise generate task-stubs
$ ./bin/test
running tests