Back to Mise

`mise exec`

docs/cli/exec.md

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

mise exec

  • Usage: mise exec [FLAGS] [TOOL@VERSION]… [-- COMMAND]…
  • Aliases: x
  • Source code: src/cli/exec.rs

Execute a command with tool(s) set

use this to avoid modifying the shell session or running ad-hoc commands with mise tools set.

Tools will be loaded from mise.toml, though they can be overridden with <RUNTIME> args Note that only the plugin specified will be overridden, so if a mise.toml file includes "node 20" but you run mise exec [email protected]; it will still load node@20.

The "--" separates runtimes from the commands to pass along to the subprocess.

Arguments

  • [TOOL@VERSION]… — Tool(s) to start e.g.: node@20 [email protected]
  • [-- COMMAND]… — Command string to execute (same as --command)

Flags

  • -c --command <COMMAND> — Command string to execute

  • -j --jobs <JOBS> — Number of jobs to run in parallel Values below 1 are treated as 1 [default: 4]

    Environment Variable: MISE_JOBS

  • --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) macOS only in v1; on Linux falls back to allowing all network

  • --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 (only PATH, HOME, USER, SHELL, TERM, LANG pass through)

  • --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-deps — Skip automatic dependency preparation

  • --raw — Connect backend install command stdin/stdout/stderr directly to the terminal Implies --jobs=1

  • -h --help — Print help

Examples:

$ mise exec node@20 -- node ./app.js  # launch app.js using node-20.x
$ mise x node@20 -- node ./app.js     # shorter alias

# Specify command as a string:
$ mise exec node@20 [email protected] --command "node -v && python -V"

# Run a command in a different directory:
$ mise x -C /path/to/project node@20 -- node ./app.js