Mise - Package Manager

05/01/2025, Thu
Categories: #installer

Choices and Versatility

Asdf is a tools and program installer that has been around for some time, but there is a newer tool that grants you the powers of asdf with even more capabilities such as automatic dependency management, larger choice of programs with support from different source registries and temporary dependency switching which comes from mise.

These aren't the only functionality of mise, but they are a few that can make an impact on improving your dependency management workflow.

Automatic Dependency Change Upon Project Folder Navigation

Mise simplifies the way you manage your runtime or programming language versions when you need to switch to different project folders that require a certain version.

Supposedly that you are interested in install different versions of nodejs, one LTS and the other more newer non-LTS version.

mise install node@22.12.0
mise install node@23.11.0

Set the version of nodejs that is to be the global default. This should generally be a LTS version of nodejs.

mise use --global node@22.12.0

Check which version is nodejs is used.

mise ls
Tool  Version  Source                      Requested
node  22.12.0  ~/.config/mise/config.toml  22.12.0
node  23.11.0

If you wish to use a newer version of nodejs that might not be supported in the long term for experimentation in a new project folder, you can create mise.toml file that specifies the newer version of nodejs

# mise.toml

[tools]
node = '23.11.0'

Make the toml file trusted for mise to respect the toml file.

mise trust

Open a new terminal tab and navigate to the same folder. Once you do, mise should have switch to the version defined in the mise.toml file. Check the config in your project folder to confirm.

mise config

The output from the last line describes the source that mise will read from to set the nodejs to that version. Equivalently, you can also verify the active version with

mise ls --current

Install Packages From Different Sources

Mise supports multiple backends to allow you to install programs or tools from different package managers for different ecosystems. This expands the range of tools that you can install if Mise does not include it by default.

For example, quarto can be installed with asdf since Mise did not have it during this time of writing.

Install the asdf plugin for installing quarto since all asdf tools require you to install a plugin before you can install the actual tool.

mise plugins install https://github.com/lucaswilric/asdf-quarto

List out all the version of quarto see what version you want to install.

mise list-all quarto

Install the quarto version of your choice

mise install quarto <version-number>

Set the quarto version as the global default version

mise use quarto <version-number>

On Demand Switch to a Version

Temporarily use a tool at a specific version without formally switching to that version globally. This is useful in the situation if you wish to test out a new version of a tool for performance or to examine if the command still runs as it should. This reduces the mistakes you can make with different versions of a tool if you forget to switch back the global version to stable one after making the temporary switch.

mise exec node@23.11.0 -- node -v