mise run
- Usage:
mise run [FLAGS] [TASK] [ARGS]… - Aliases:
r - Source code:
src/cli/run.rs
Run tasks and their dependencies
Use mise run TASK [ARGS...] for one task, or separate task invocations with ::: to schedule several. Put mise flags before the task name; following arguments are passed to that task. With no task, mise runs default when defined or opens the task selector in an interactive terminal.
Tasks are defined in mise.toml or task directories. A task with sources and outputs can skip execution when its outputs are fresh. --force bypasses freshness checks; task output caching has separate --task-cache controls.
For a project that already has npm build scripts and its dependencies installed:
[tasks.build]
run = "npm run build"
sources = ["src/**/*.ts", "package.json", "package-lock.json"]
outputs = ["dist/**/*.js"]To create a standalone script task, use mise tasks add --file hello -- echo hello. Then run mise run hello. See https://mise.jdx.dev/tasks/ for task directories, arguments, caching, and dependency configuration.
Flags
--affected— Run matching tasks only for projects affected by Git changes--affected-base <REV>— Git base revision for --affected Defaults to MISE_AFFECTED_BASE, CI metadata, or HEAD~1--affected-explain— Explain why projects and tasks were selected by --affected--affected-head <REV>— Git head revision for --affected Defaults to MISE_AFFECTED_HEAD, CI metadata, or HEAD--affected-json— Output affected projects and tasks as JSON without running tasks--all— Open the interactive selector with all tasks from the entire monorepo-c --continue-on-error— Continue running tasks even if one fails-C --cd <CD>— Change to this directory before executing the command-f --force— Force the tasks to run even if outputs are up to date-j --jobs <JOBS>— Number of tasks to run in parallel Values below 1 are treated as 1 Defaults to thejobssetting or theMISE_JOBSenv varEnvironment Variable:
MISE_JOBS-n --dry-run— Don't actually run the task(s), just print them in order of execution-o --output <OUTPUT>— How task output is displayedprefix- Print stdout/stderr by line, prefixed with the task's labelinterleave- Print directly to stdout/stderr instead of by linereplacing- Stdout is replaced each time, stderr is printed as istimed- Only show stdout lines if they are displayed for more than 1 secondkeep-order- Print stdout/stderr by line, prefixed with the task's label, but keep the order of the outputquiet- Don't show extra outputsilent- Don't show any output including stdout and stderr from the task except for errors
Environment Variable:
MISE_TASK_OUTPUT-q --quiet— Don't show extra outputEnvironment Variable:
MISE_QUIET-r --raw— Read/write directly to stdin/stdout/stderr instead of by line Redactions are not applied with this option Configure withrawconfig orMISE_RAWenv var-s --shell <SHELL>— Shell to use to run toml tasksDefaults to
sh -o errexit -con unix, andcmd /con Windows Can also be set with the settingMISE_UNIX_DEFAULT_INLINE_SHELL_ARGSorMISE_WINDOWS_DEFAULT_INLINE_SHELL_ARGSOr it can be overridden with theshellproperty on a task.-S --silent— Don't show any output except for errorsEnvironment Variable:
MISE_SILENT-t --tool <TOOL@VERSION>— Tool(s) to run in addition to what is in mise.toml files e.g.: node@20 [email protected]--allow-env <VAR>— Allow specific env var through (implies --deny-env for everything else) Supports wildcards, e.g. --allow-env='MYAPP_*'--allow-net <HOST>— Allow network to specific host (implies --deny-net for everything else) Per-host filtering is unsupported on Linux and returns an error. See the sandboxing guide for current macOS host-filter limitations. On Windows, sandboxing is unavailable: mise warns and runs without host filtering.--allow-read <PATH>— Allow reads from specific path (implies --deny-read for everything else)--allow-write <PATH>— Allow writes to specific path (implies --deny-write for everything else)--deny-all— Block reads, writes, network, and env vars--deny-env— Block env var inheritance except PATH, HOME, USER, SHELL, TERM, COLORTERM, LANG--deny-net— Block all network access--deny-read— Block filesystem reads (system libs and tool dirs still accessible)--deny-write— Block all filesystem writes--fresh-env— Bypass the environment cache and recompute the environment--no-cache— Do not use cache on remote tasksEnvironment Variable:
MISE_TASK_REMOTE_NO_CACHE--no-deps— Skip automatic dependency preparation--no-timings— Hide the elapsed time printed after each task completesSet
MISE_TASK_TIMINGS=0to hide it by default--skip-deps— Run only the specified tasks skipping all dependenciesEnvironment Variable:
MISE_TASK_SKIP_DEPENDS--skip-tools— Skip installing tools before running tasksCan also be set persistently with the
task.run_auto_installsetting orMISE_TASK_RUN_AUTO_INSTALL=falseenv var--task-cache <TASK_CACHE>— Set task output cache access for this runread-write- Read cached results and write new resultsread-only- Read cached results without writing new resultswrite-only- Write new results without reading cached resultsoff- Disable task output cachinglocal-only- Read and write only the local cache; currently equivalent toread-write
Choices:
read-write,read-only,write-only,off,local-onlyDefault:
read-writeEnvironment Variable:
MISE_TASK_CACHE--task-cache-explain— Explain the inputs that produced each task's output cache key--task-cache-explain-json— Output cache-key input details as JSON Lines without running tasks--task-cache-stats— Report task output cache hits, restored bytes, and time saved--timeout <TIMEOUT>— Timeout for the task to complete e.g.: 30s, 5m
Examples
Run the "lint" task, defined either in mise.toml or as a standalone script.
mise run lintForce the "build" task to run even if its sources are up to date.
mise run --force buildRun "test" with stdin/stdout/stderr all connected to the current terminal. This forces --jobs=1 to prevent interleaving of output.
mise run --raw testRun the "lint", "test", and "check" tasks in parallel.
mise run lint ::: test ::: checkRun multiple tasks, each with its own arguments.
mise run cmd1 arg1 arg2 ::: cmd2 arg1 arg2