Skip to main content
  1. Tools/

Mise

··1173 words·6 mins· loading ·

Overview
#

mise is a multi purpose tool. It has three major purposes, installation of dev tools, running tasks, and managing environment variables.

It may have more bells and whistles, but for me those three major functionalities are key!

Why I Use It
#

I started using mise to install all my dev/cli tools. I did that, because I am using macOS, Fedora Linux, and Red Hat Enterprise Linux 10. The major problem I had was that each system uses different package managers: brew on macOS, dnf and yum on Linux systems. But the Linux systems especially do not have all my dev tools available in the repositories. And while brew is an awesome tool for macOS but it is kind of painful to install specific versions of tools. E.g. I have a project which expects helm in version 3. With mise it is as easy as possible, just use mise use helm@3 to install the latest version of the third major release.

Key Features
#

  • You can install tools like npm, uv, kubectl, sops or whatever you need as a Developer, DevOps Engineer or any other role.
  • mise also is a task runner like make, just, taskfile. I just used make and its Makefiles but neither did I use just nor taskfile.
  • To complete the functionality of mise it is also an environment variable manager like direnv.

Installation
#

For an installation guide, see the official website: mise installation

Basic Usage
#

After installing mise, you can use it without any configuration by running mise exec. mise exec is used to temporarily install tools and execute them.

1
mise exec python@3 -- python

This will download the latest python 3 version and execute the python binary, you will be directly dropped into the python shell.

1
mise exec sops@latest -- sops --help

This will install sops and execute the sops binary command.

If you need a very specific version you can add this version after @.

1
mise exec helm@4.1.1 -- helm version

You should be presented with the exact version of helm. And this is what makes mise so handy, it allows you to use specific versions. This will be more effective and important, after using project specific configuration files.

Advanced Tips
#

In Basic Usage, I explained how to use the mise exec command. But this is not all.

Shell Integration
#

To use mise’s full potential, I would highly recommend integrating it into your shell. See the official documentation for how to achieve that.

Global Tool Installation
#

If you are using the shell integration of mise activate described in Shell Integration, you can install tools globally in your path. But before installing tools, you need to know which tools are available by default. Either you use mise versions or you use mise use -g, the -g stands for global. With mise use -g you will be presented with a fuzzy search of all available tools. If you search for, e.g., kubectl and hit ENTER, kubectl gets installed and is available in your $PATH.

mises Backends
#

But there is more: mise comes with lots of backends. This means you cannot only install the default tools, it is also possible to install go, python tools which are not in the mise registry. E.g., I use the cobra-cli to create boilerplate code for new CLIs written in go.

1
mise use -g go:github.com/spf13/cobra-cli@latest

This installs the cobra-cli CLI on the system and into my $PATH.

Project-Specific Configuration
#

Let us dive into the project specific-configuration. I described the global tool installation. But what makes mise so different from e.g. brew or dnf?

The project specific configuration for tools, tasks, and environment variable configuration.

Tool installation
#

There is no difference between the Global Tool Installation and the project-specific tools. Except for not using the -g flag. As soon as you install a tool, mise.toml will get created in the project directory. Each time you go into this directory, the tool will either be installed or the version which you have specified inside the mise.toml will be used.

This makes it possible to install kubectl globally in the latest version and for a project in an older version.

Tasks
#

Now, one of my favorite features: tasks! You may be familiar with make and its Makefiles or other tools like just or task. You can create tasks, which then are callable with mise run. To create a simple task, you need to edit the mise.toml in your project. If there is no mise.toml, just create one.

mise.toml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
[tasks.before]
hide = true
run = "echo 'I am running before'"

[tasks.myjob]
depends = ["before"]
depends_post = ["after"]
description = "This is myjob tasks description"
tools = { python = "latest", go = "latest" }
run = """
#!/bin/bash
go version
python --version
"""

[tasks.after]
hide = true
run = "echo 'I am running after'"

If you execute mise run you will see all configured tasks, but with the configuration above, you only see one task myjob. The before and after tasks will not be shown, because they are configured as hidden with hide = true.

But if you execute mise run myjob, you will see that the output looks like

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
> mise run myjob
Tasks foo
[before] $ echo 'I am running before'
I am running before
[myjob] $ #!/bin/bash
go version go1.25.7 darwin/arm64
Python 3.14.3
[after] $ echo 'I am running after'
I am running after
Finished in 251.5ms

This is because before and after tasks are configured in myjob as depends and depends_post. The tools = { python = "latest", go = "latest" } line configures the job that it needs go and python.

You do not need to add tools to the task’s tools configuration if you already have a [tools] configuration with mandatory tools. But it is possible to configure tools specific for a certain task.

Environment Variables
#

Sometimes I work on projects where certain environment variables always need to be exported. Before using mise, I had shell scripts that exported those variables, but I had to execute them manually.

If you have activated mise like in Shell Integration you can export environment variables when changing into a directory with a mise.toml.

mise.toml
1
2
[env]
ENVIRONMENT = "dev"

Every time you enter the project the ENVIRONMENT environment variable will be exported. Check with echo $ENVIRONMENT; it should return with dev.

Takeaway
#

Now you should have a brief overview of the core functionalities of mise. But there is a lot more to find out.

Useful Links#

Alternatives
#

Bitfoo
Author
Bitfoo
I wrangle Kubernetes clusters and automate infrastructure by day.
At night, I run self-hosted services to keep control over my data.
I write about real DevOps challenges and the tools I actually use.
Sometimes things break. That’s when I learn the most.