Back to Mise

`mise generate task-stubs`

docs/cli/generate/task-stubs.md

2026.8.151.9 KB
Original Source
<!-- @generated by usage-cli from usage spec -->

mise generate task-stubs

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 of

    Default: bin

  • -m --mise-bin <MISE_BIN> — Path to a mise bin to use when running the task stub.

    Use --mise-bin=./bin/mise to use a mise bin generated from mise generate install-script

    On 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 default mise is 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 launch

    cmd writes <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.

    exe writes a native <task>.exe instead, 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, exe

    Default: cmd

  • -h --help — Print help

Examples:

$ mise tasks add test -- echo 'running tests'
$ mise generate task-stubs
$ ./bin/test
running tests