Config Environments
It's possible to have separate mise.toml files in the same directory for different environments like development and production. To enable, set MISE_ENV to an environment like development or production using one of these methods:
- CLI flag:
-E developmentor--env development - Environment variable:
MISE_ENV=development .miserc.tomlfile:env = ["development"]
mise will then look for a mise.{MISE_ENV}.toml file in the current directory, parent directories and the MISE_CONFIG_DIR directory.
Setting MISE_ENV in .miserc.toml
You can set MISE_ENV in a .miserc.toml file, which is loaded very early before other config files are discovered. This allows you to commit your environment configuration to version control:
# .miserc.toml
env = ["development"]File locations searched (in order of precedence):
.miserc.tomlin current directory and parent directories~/.config/mise/miserc.toml(global)/etc/mise/miserc.toml(system)
Note: MISE_ENV cannot be set in mise.toml because it determines which config files to load in the first place.
mise will also look for "local" files like mise.local.toml and mise.{MISE_ENV}.local.toml in the current directory and parent directories. These are intended to not be committed to version control. (Add mise.local.toml and mise.*.local.toml to your .gitignore file.)
The priority of these files goes in this order (top overrides bottom):
mise.{MISE_ENV}.local.tomlmise.local.tomlmise.{MISE_ENV}.tomlmise.toml
If MISE_OVERRIDE_CONFIG_FILENAMES is set, that will be used instead of all of this.
You can also use paths like mise/config.{MISE_ENV}.toml or .config/mise.{MISE_ENV}.toml Those rules follow the order in Configuration.
Use mise config to see which files are being used.
The rules around which file is written are different because we ultimately need to choose one. See the docs for mise use for more information.
Multiple environments can be specified, e.g. MISE_ENV=ci,test with the last one taking precedence.