# Using Mise for managing multiple versions of software

> This is a living document. I'll be updating as soon as I improve my setup.

I used to use asdf on my Mac OS X to manage different software versions across my projects, but I was constantly having problems due to various issues.

My manager, Yousif, has recommended a tool that he has been using on a lot of projects at Gruntwork, including Terragrunt: [https://github.com/gruntwork-io/terragrunt/blob/main/mise.toml](https://github.com/gruntwork-io/terragrunt/blob/main/mise.toml)

I've been using it for a few days, and my experience is way better than using asdf so far. I'm writing this guide to help others, but also to remind myself of my own setup.

## Installation

Mise is available in different package managers, but I chose to set up with their own required shell script:

```bash
curl https://mise.run | sh
```

I've previously installed `mise` with `homebrew`, but I decided to change the setup because installing with Homebrew doesn't allow me to use `mise self-update` to update `mise`'s version.

## Integration with Zsh

After `mise` is installed, it's suggested to add it to your shell configuration profile.

There's one line added to my `~/.zshrc` file to activate `mise`:

```bash
eval "$(/Users/diogenesaherminio/.local/bin/mise activate zsh)"
```

## Integration with VSCode

I'm using this excellent VSCode extension for the whole integration with my Go environment: [https://hverlin.github.io/mise-vscode/guides/golang/](https://hverlin.github.io/mise-vscode/guides/golang/)

What does that mean? You create one `mise.toml` at the root of the project, similar to this one:

```ini
[tools]
go = "1.25.0"
golangci-lint = "2.4.0"
"go:github.com/goph/licensei/cmd/licensei" = "v0.9.0"
"go:go.uber.org/mock/mockgen" = "v0.6.0"
"go:golang.org/x/tools/gopls" = "v0.20.0"
```

And then all the Go binaries, such as goimports, are set up for both my terminal and VSCode.

## What if there's no `mise.toml` in the folder you're in?

mise offers a possibility to have global defaults for the tool you're trying to use. To use them, you need to run (using go as an example):

```bash
mise use -g go@1.25
```

This will make the `go` binary available to your terminal globally, but the specific version required by your project will be used if you're in any folder of that project.

This configuration is saved at `~/.config/mise/config.toml` :

```bash
cat ~/.config/mise/config.toml
[tools]
go = "1.25"
```
