Skip to content

mise run ​

  • Usage: mise run [FLAGS] [TASK] [ARGS]…
  • Aliases: r
  • Source code: src/cli/run.rs

Run tasks and their dependencies

Run one task with mise run TASK [ARGS...], or several with ::: between them. Put mise flags before the task name; everything after it goes to the task. With no task, mise runs the default task if there is one, or opens a task picker in an interactive terminal.

Tasks come from [tasks] in mise.toml and from task directories such as mise-tasks/. A task with sources and outputs is skipped while its outputs are up to date; --force runs it anyway. For example:

[tasks.build]
run = "npm run build"
sources = ["src/**/*.ts", "package.json", "package-lock.json"]
outputs = ["dist/**/*.js"]

The experimental artifact cache (a task's cache field) has separate --task-cache controls.

To create a script task, run mise tasks add --file hello -- echo hello, then mise run hello. See https://mise.jdx.dev/tasks/running-tasks.html

Flags ​

  • --affected — Run matching tasks only where Git changes affect them

    Counts committed changes between the base and head revisions, plus staged, unstaged, and untracked changes in the working tree when the head revision is the checked-out commit. Under a monorepo root (monorepo_root = true), runs the tasks in the affected projects. Otherwise runs the tasks whose sources or defining config file include a changed file, and the tasks that declare no sources.

  • --affected-base <REV> — Git base revision for --affected

    Defaults to MISE_AFFECTED_BASE, CI metadata, or HEAD~1.

  • --affected-committed — Count committed changes between the base and head revisions

    Alone, ignores the working tree. Combines with --affected-uncommitted and --affected-untracked. With none of the three, every source counts (the working-tree sources only when the head revision is the checked-out commit). Also set by MISE_AFFECTED_COMMITTED.

  • --affected-explain — Explain why --affected selected each project or task

  • --affected-head <REV> — Git head revision for --affected

    Defaults to MISE_AFFECTED_HEAD, CI metadata, or HEAD.

  • --affected-json — Print the affected projects and tasks as JSON without running tasks

  • --affected-uncommitted — Count staged and unstaged changes to tracked files

    Combines with the other source flags. Alone, ignores committed changes. Needs the head revision to be the current checkout. Also set by MISE_AFFECTED_UNCOMMITTED.

  • --affected-untracked — Count untracked files that Git does not ignore

    Combines with the other source flags. Alone, ignores committed changes. Needs the head revision to be the current checkout. Also set by MISE_AFFECTED_UNTRACKED.

  • --at <REV> — Run the tasks at another git revision, in a temporary worktree

    Checks REV out into a detached git worktree under mise's temporary directory, with its submodules, and runs the tasks there with that revision's own config and tasks. The worktree is removed afterwards, also when a task fails or is interrupted. Ignored files such as build caches are not there; use --at-setup to prepare them.

    The config at REV is trusted only if the repository's main checkout is; it is never trusted on its own, by a prompt, or by --yes.

  • --at-setup <CMD> — Run this shell command in the --at worktree before the tasks

    It runs in the worktree's copy of the directory mise was started from (not a task's dir), outside mise's environment, with MISE_RUN_AT_SOURCE set to the repository the worktree came from. --timeout does not limit it, only the tasks after it.

  • --all — Open the task picker with tasks from every project in the monorepo

  • -c --continue-on-error — Continue running tasks even if one fails

  • -C --cd <DIR> — Change to this directory before running the tasks

  • -f --force — Run the tasks even if their outputs are up to date

  • -j --jobs <JOBS> — Number of tasks to run in parallel (default: the jobs setting)

    Values below 1 are treated as 1.

    Environment Variable: MISE_JOBS

  • -n --dry-run — Print the tasks in the order they would run, without running them

  • -o --output <OUTPUT> — How task output is displayed

    • prefix - Print stdout/stderr by line, prefixed with the task's label
    • interleave - Print directly to stdout/stderr instead of by line
    • replacing - Stdout is replaced each time, stderr is printed as is
    • timed - Only show stdout lines if they are displayed for more than 1 second
    • keep-order - Print stdout/stderr by line, prefixed with the task's label, but keep the order of the output
    • summary - Print one line for each task that passed, and all of a failed task's output once it ends
    • quiet - Deprecated; use --output interleave --quiet
    • silent - Do not show any output, including the task's stdout and stderr, except errors

    Environment Variable: MISE_TASK_OUTPUT

  • -q --quiet — Do not show extra output

    Environment Variable: MISE_QUIET

  • -r --raw — Connect the tasks directly to stdin, stdout, and stderr instead of reading their output by line

    Redactions are not applied, and tasks run one at a time. Set the raw setting to make this the default.

  • --report-file <PATH> — Write a JSON report of every task the run scheduled to this file when the run ends

    Written on success, failure, Ctrl-C and --timeout. Each task gets a status (passed, failed, cancelled, skipped, cached or not_run), its exit code, duration and timestamps. Tasks the run starts do not inherit MISE_TASK_REPORT_FILE.

    Environment Variable: MISE_TASK_REPORT_FILE

  • --secrets <SECRET> — [experimental] Give the named tasks these secrets (comma-separated); their dependencies and subtasks do not get them

    Put this flag before the task name. Not allowed in safe mode.

  • --secrets-all — [experimental] Give the named tasks every secret the project can inject; their dependencies and subtasks do not get them

    Covers the fnox secrets with env = true or env = "exec", never those with env = false. Put this flag before the task name. Not allowed in safe mode.

  • -s --shell <SHELL> — Shell used to run TOML tasks that do not set their own shell

    Defaults to sh -o errexit -c on Unix and cmd /c on Windows, from the unix_default_inline_shell_args or windows_default_inline_shell_args setting. A task's shell property takes precedence over this flag.

  • -S --silent — Do not show any output except for errors

    Environment Variable: MISE_SILENT

  • -t --tool <TOOL@VERSION> — Extra tools to use with the tasks, e.g. node@24 python@3.13

  • --allow-env <VAR> — Allow a specific env var through (implies --deny-env for everything else)

    Supports wildcards, such as --allow-env='MYAPP_*'.

  • --allow-net <HOST> — Allow network access only to HOST (not supported on any platform)

    Per-host filtering does not work: Linux and macOS exit with an error, and Windows runs the task without network restrictions. See https://mise.jdx.dev/sandboxing.html#access-to-particular-hosts

  • --allow-read <PATH> — Allow reads from a specific path (implies --deny-read for everything else)

  • --allow-write <PATH> — Allow writes to a 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, and LANG

    On Windows it also keeps the variables programs need to start, such as SystemRoot and TEMP.

  • --deny-net — Block all network access

  • --deny-read — Block filesystem reads (system libraries and tool directories stay readable)

  • --deny-write — Block filesystem writes except temporary and device paths (/tmp, /dev)

  • --fresh-env — Bypass the environment cache and recompute the environment

  • --no-cache — Do not use the cache for remote tasks

    Environment Variable: MISE_TASK_REMOTE_NO_CACHE

  • --no-deps — Do not run [deps] providers that have auto = true before the tasks

  • --no-timings — Hide the elapsed time printed after each task completes

    Set task.timings = false to hide it by default.

  • --skip-deps — Run only the named tasks, not the tasks they depend on

    Environment Variable: MISE_TASK_SKIP_DEPENDS

  • --skip-tools — Do not install missing tools before running the tasks

    Set task.run_auto_install = false to make this the default.

  • --task-cache <TASK_CACHE> — [experimental] Set artifact cache access for this run

    • read-write - Read cached results and write new results
    • read-only - Read cached results without writing new results
    • write-only - Write new results without reading cached results
    • off - Disable the artifact cache
    • local-only - Read and write only the local cache, skipping any remote cache

    Choices: read-write, read-only, write-only, off, local-only

    Default: read-write

    Environment Variable: MISE_TASK_CACHE

  • --task-cache-explain — [experimental] Explain the inputs that produced each task's artifact cache key

  • --task-cache-explain-json — [experimental] Print cache-key input details as JSON Lines without running tasks (requires --dry-run)

  • --task-cache-stats — [experimental] Report artifact cache hits, restored bytes, and time saved

  • --tag <TAG> — Run only the matching tasks that have this tag; repeat to accept any of several

    With no task name, selects every task with the tag, as if the task were **. The tags come from each task's tags property. Dependencies run whatever their tags.

  • --timeout <TIMEOUT> — Stop the run if it takes longer than this, e.g. 30s or 5m

    Overrides the task.timeout setting.

  • --lock-timeout <LOCK_TIMEOUT> — Fail a task that waits longer than this for a lock, e.g. 30s or 5m

    Overrides the task.lock_timeout setting.

Examples ​

Run the "lint" task, defined in mise.toml or as a script

mise run lint

Run "build" even if its outputs are up to date

mise run --force build

Run "test" connected directly to the terminal, one task at a time

mise run --raw test

Run the "lint", "test", and "check" tasks in parallel

mise run lint ::: test ::: check

Run several tasks, each with its own arguments

mise run cmd1 arg1 arg2 ::: cmd2 arg1 arg2

Run tasks one at a time

mise run -j 1 lint ::: test

Run every task that matches a pattern

mise run 'test:*'

Run every task tagged "lint"

mise run --tag lint

Run a task in a monorepo project

mise run //services/api:build

Run "test" as it is on main, in a temporary git worktree

mise run --at main test

Give "deploy" the DEPLOY_KEY secret (experimental); its dependencies do not get it

mise run --secrets DEPLOY_KEY deploy
MIT LicenseCopyright © 2026jdx.dev