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 run a command with mise's tools and environment without modifying the shell session, or to run ad-hoc commands with tools that are not in the config.
Tools are loaded from mise.toml and can be overridden with <TOOL@VERSION> args. Only the tools you name are overridden: if mise.toml includes node = "20" and you run mise exec [email protected] -- python -V, node@20 is still loaded.
The "--" separates tools from the command to pass along to the subprocess.
Arguments
[TOOL@VERSION]…— Tool(s) to load e.g.: node@20 [email protected][-- COMMAND]…— Executable and arguments to run directly, after--
Flags
-c --command <COMMAND>— Command string to execute through a shell (supports pipes and redirection)-j --jobs <JOBS>— Number of jobs to run in parallel Values below 1 are treated as 1 Defaults to thejobssettingEnvironment 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) 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-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
Launch app.js using node-20.x, with the full command or its shorter alias.
mise exec node@20 -- node ./app.js
mise x node@20 -- node ./app.jsSpecify 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