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:

toml
[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 in projects affected by Git changes

    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. Requires a monorepo root (monorepo_root = true).

  • --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 and 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.

  • --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
    • 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.

  • --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 [email protected]

  • --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

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

    Overrides the task.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 a task in a monorepo project

mise run //services/api:build

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

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