mise install
- 用法:
mise install [FLAGS] [TOOL@VERSION]… - 别名:
i - 效果: 修改状态
- 源代码:
src/cli/install.rs
Install the tools in your config, or specific tool versions
With no arguments, installs every tool version your config requests that is not installed yet. With TOOL@VERSION arguments, installs those versions; a bare tool name installs the version your config requests for it.
Installing does not add a tool to your config, so a tool you have not configured is not on PATH. Use mise use to install a tool and add it to mise.toml, or mise exec <TOOL>@<VERSION> -- <COMMAND> to run it once.
Versions install in parallel (see --jobs) under the mise data directory, by default ~/.local/share/mise/installs/<TOOL>/<VERSION>.
Arguments
[TOOL@VERSION]…— Tools to install, such asnode@24; defaults to every tool in the config
Flags
-f --force— Reinstall even if already installedWith no TOOL arguments, reinstalls every configured tool.
-j --jobs <JOBS>— How many tools to install in parallel; defaults to thejobssettingValues below 1 are treated as 1.
Environment Variable:
MISE_JOBS-n --dry-run— Show what would be installed, without installing anything-v --verbose— Show installer outputPrints each backend's download, configure, and compile output.
--dry-run-code— Like --dry-run, but exit with status 1 when anything needs installingUse it in scripts to check whether
mise installhas work to do.--include-task-tools— Also install tools required by tasks in the current scope这会准备任务工具,但不会运行任务命令或依赖项。 与 --monorepo 结合使用可包含每个已配置根目录中的任务。
--include-lazy— 同时安装配置了lazy = true的工具By default, a bare
mise installleaves lazy tools to be installed the first time you run one of their commands.--minimum-release-age <AGE>— Only install versions released before a date or at least a duration agoTakes a date such as
2024-06-01or a duration such as90dor1y. Overrides theminimum_release_agesetting and tool option.--monorepo— Also install tools from every config root in[monorepo].config_rootsRequires
monorepo_root = trueand an explicitconfig_rootslist in the monorepo root's config. Uses the active MISE_ENV.Environment Variable:
MISE_MONOREPO--raw— Connect install commands directly to the terminal; implies --jobs=1--shared <DIR>— Install into DIR instead of the mise data directoryMay require elevated permissions, depending on the path.
--system— Install into the system-wide shared directory安装到
/usr/local/share/mise/installs(或MISE_SYSTEM_DATA_DIR/installs)。在 Unix 上,除非禁用system_packages.sudo,二进制下载后端会调用 sudo 将文件发布到受保护的系统目录。请以普通用户身份运行 mise,不要使用 sudo。-h --help— 打印帮助
示例
Install every tool the config requests
mise installInstall the node version the config requests
mise install nodeInstall the latest node 24.x release
mise install node@24Install an exact version
mise install [email protected]Also install tools marked lazy = true
mise install --include-lazyAlso install the tools your tasks need
mise install --include-task-tools