Skip to content
Latchkey

mise run: Define and Run Tasks with mise

mise run executes a task defined under [tasks] in mise.toml or in a tasks directory.

Beyond versions, mise is also a task runner. Tasks defined in mise.toml run with the pinned tools already on PATH, so a build task uses the project Node automatically.

What it does

A task is defined under [tasks.name] in mise.toml with a run command (or as a script file in a tasks directory). mise run <name> executes it with the project tools active. Tasks declare depends to run other tasks first and sources/outputs to skip when unchanged. mise tasks lists the available tasks.

Common usage

mise.toml / Terminal
# mise.toml
[tools]
node = "20"

[tasks.build]
run = "npm run build"

[tasks.test]
depends = ["build"]
run = "npm test"

# run a task (tools from [tools] are on PATH)
mise run test
# shorthand
mise test

Syntax

Key / commandWhat it does
[tasks.<name>]Define a task in mise.toml
run = "<command>"The command the task executes
depends = ["a"]Tasks to run before this one
sources / outputsFiles to fingerprint so unchanged tasks skip
mise run <name>Run the named task with project tools active
mise tasksList the defined tasks

In CI

Defining tasks in mise.toml means a single mise run build uses the pinned toolchain without a separate setup step, since the [tools] are active for the task. Use depends to chain lint, test, and build so one command enforces the order in the pipeline.

Common errors in CI

"mise: no task ... found" means the task name is misspelled or mise.toml is in another directory. A task that cannot find its tool ("command not found") usually means the [tools] were never installed; run mise install first. A depends cycle reports a dependency loop and aborts.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →