跳转到内容

mise plugins install

  • 用法: mise plugins install [FLAGS] [NEW_PLUGIN] [GIT_URL]
  • 别名: iaadd
  • 效果: 修改状态
  • 源代码: src/cli/plugins/install.rs

安装一个插件

注意,mise 在你安装工具时可以自动安装插件
例如:mise install [email protected] 将自动安装 cmake 插件

此行为可以在 ~/.config/mise/config.toml 中修改。

参数

  • [NEW_PLUGIN] — 要安装的插件名称 例如:cmake、poetry 可以指定多个插件:mise plugins install cmake poetry
  • [GIT_URL] — 插件的 Git URL

标志

  • -a --all — 安装所有缺失的插件 这只会安装具有匹配简写名的插件 即:不需要完整的 Git 仓库 URL
  • -f --force — 即使插件已存在也重新安装
  • -j --jobs <JOBS> — 要并行运行的任务数 小于 1 的值将按 1 处理
  • -v --verbose — 显示安装输出
  • -h --help — 打印帮助

示例:

# 通过简写名安装 poetry
$ mise plugins install poetry

# 使用特定的 git URL 安装 poetry 插件
$ mise plugins install poetry https://github.com/mise-plugins/mise-poetry.git

# 仅使用 git URL 安装 poetry 插件
#(poetry 会从 URL 中推断)
$ mise plugins install https://github.com/mise-plugins/mise-poetry.git

# 使用特定的 ref 安装 poetry 插件
$ mise plugins install poetry https://github.com/mise-plugins/mise-poetry.git#11d0c1e