跳转到内容

mise bootstrap packages use ​

  • 用法: mise bootstrap packages use [FLAGS] <PACKAGE>…
  • 别名: u
  • 效果: 修改状态
  • 源代码: src/cli/system/use.rs

Add packages to [bootstrap.packages] and install them

Like mise use for tools: writes a "manager:package" = "version" entry to the local mise.toml (or the global config with -g), then installs anything missing. If the manager is not available on this machine, such as apt: on macOS, the entry is written without installing.

Pin a version with @, as in apt:[email protected]; without @, or with @latest, the entry is "latest". Homebrew puts versions in formula and cask names (brew:postgresql@17, brew-cask:temurin@17), so there @ is part of the name. mas takes numeric App Store IDs and nix takes attribute paths or flake references, so neither accepts @version. aur, flatpak, flatpak-user, pacman, and snap accept @version but cannot install a pin, so installing skips those entries with a warning.

参数 ​

  • <PACKAGE>… — 采用 manager:package[@version] 形式的包

Flags ​

  • -e --env <ENV> — Write to the config file for this environment (mise.<ENV>.toml)

  • -g --global — Write to the global config (~/.config/mise/config.toml) instead of the local one

    New entries go to the write_targets.packages file when that setting is set.

  • -n --dry-run — Show what would change without writing config or installing

  • -p --path <PATH> — Write to this config file or directory

    别名: --file

  • -y --yes — 跳过确认提示

  • --no-install — 写入包声明,但不检查或安装包

  • -h --help — 打印帮助

示例 ​

Declare apt and winget packages; each machine installs the ones it can

mise bootstrap packages use apt:curl winget:BurntSushi.ripgrep.MSVC

On macOS, add a formula and a cask

mise bootstrap packages use brew:jq brew-cask:firefox

Add a versioned Homebrew formula to the global config

mise bootstrap packages use -g brew:postgresql@17

Pin an apt package to a version

mise bootstrap packages use apt:[email protected]

相关文档 ​