Back to Mise

`mise run`

docs/cli/run.md

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

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:

toml
[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 the jobs setting or the MISE_JOBS env var

    Environment 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 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 - Don't show extra output
    • silent - 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 output

    Environment Variable: MISE_QUIET

  • -r --raw — Read/write directly to stdin/stdout/stderr instead of by line Redactions are not applied with this option Configure with raw config or MISE_RAW env var

  • -s --shell <SHELL> — Shell to use to run toml tasks

    Defaults to sh -c -o errexit -o pipefail on unix, and cmd /c on Windows Can also be set with the setting MISE_UNIX_DEFAULT_INLINE_SHELL_ARGS or MISE_WINDOWS_DEFAULT_INLINE_SHELL_ARGS Or it can be overridden with the shell property on a task.

  • -S --silent — Don't show any output except for errors

    Environment 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 tasks

    Environment Variable: MISE_TASK_REMOTE_NO_CACHE

  • --no-deps — Skip automatic dependency preparation

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

    Set MISE_TASK_TIMINGS=0 to hide it by default

  • --skip-deps — Run only the specified tasks skipping all dependencies

    Environment Variable: MISE_TASK_SKIP_DEPENDS

  • --skip-tools — Skip installing tools before running tasks

    Can also be set persistently with the task.run_auto_install setting or MISE_TASK_RUN_AUTO_INSTALL=false env var

  • --task-cache <TASK_CACHE> — Set task output 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 task output caching
    • local-only - Read and write only the local cache; currently equivalent to read-write

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

    Default: read-write

    Environment 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 lint

Force the "build" task to run even if its sources are up to date.

mise run --force build

Run "test" with stdin/stdout/stderr all connected to the current terminal. This forces --jobs=1 to prevent interleaving of output.

mise run --raw test

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

mise run lint ::: test ::: check

Run multiple tasks, each with its own arguments.

mise run cmd1 arg1 arg2 ::: cmd2 arg1 arg2
<!-- generated reference navigation -->