跳转到内容

mise config set ​

在一个 mise TOML 文件中设置值

默认编辑优先级最高的已加载 TOML 文件,该文件可能是特定环境的覆盖文件。使用 --file 选择现有项目文件,或使用 --global/--system 编辑或创建这些配置文件

This edits configuration without installing tools. Use mise use to install and select a version together. For environment variables and settings, mise set and mise settings set are shorter, but they choose their file differently: mise set writes the nearest mise.toml, and mise settings set writes the global config unless you pass --local.

Known settings use their declared type; boolean settings accept true, false, yes, no, 1, and 0. For other keys, true and false become booleans and every other value is stored as a string. Use --type bool to store yes, no, 1 or 0 as a boolean, --type string to store true or false as text, and --type integer for a number.

Arguments ​

  • <KEY> — Dotted key path to set, such as tools.python
  • [VALUE] — The value to set the key to (optional if provided as KEY=VALUE)

Flags ​

  • -f --file <FILE> — Config file to edit, or a directory whose config file to edit

    For a directory, mise edits the TOML config file already there, such as .mise.toml, or mise.toml when there is none. Defaults to the highest-precedence loaded TOML file.

    Aliases: --path

  • -g --global — Edit the global config file

  • --system — Edit the system config file

  • --append — Append the value to a list without duplicating an existing entry

  • --remove — Remove the value from an existing list

  • -t --type <TYPE> — TOML type to store the value as; inferred from the value by default

    可选值: infer、string、integer、float、bool、list、set

    默认值: infer

  • -h --help — 打印帮助

示例 ​

Request python 3.13

mise config set tools.python 3.13

Set an environment variable

mise config set env.NODE_ENV production

Settings get their declared type, here an integer

mise config set settings.jobs 4

List settings take comma-separated values

mise config set settings.disable_tools node,rust

Add a PATH entry unless it is already there

mise config set --append env._.path ~/.local/bin

Remove that PATH entry

mise config set --remove env._.path ~/.local/bin

Edit the global config

mise config set -g settings.experimental true

相关文档 ​