Mise: the tool for managing language versions like asdf and applying directory-specific environment variables like direnv

node.js

mise (pronounced “meez”) is a tool that combines asdf, direnv, and task runner. Written in Rust.

$ brew install mise
$ mise --version
              _                                        __              
   ____ ___  (_)_______        ___  ____        ____  / /___ _________
  / __ `__ \/ / ___/ _ \______/ _ \/ __ \______/ __ \/ / __ `/ ___/ _ \
 / / / / / / (__  )  __/_____/  __/ / / /_____/ /_/ / / /_/ / /__/  __/
/_/ /_/ /_/_/____/\___/      \___/_/ /_/     / .___/_/\__,_/\___/\___/
                                            /_/                 by @jdx
2025.7.4 macos-arm64 (2025-07-11)

Let’s try installing node. asdf plugins are available.

$ mise use --global node@22
mise WARN  gpg not found, skipping verification
mise [email protected] ✓ installed                                                                                                                                                                   mise ~/.config/mise/config.toml tools: [email protected]

$ cat ~/.config/mise/config.toml
[tools]
node = "22"

$ mise exec -- node --version
v22.17.0

When you run mise activate, the environment variables are updated.

$ which node
/usr/local/bin/node

$ echo 'eval "$(mise activate zsh)"' >> ~/.zshrc
$ source ~/.zshrc
$ mise env
export PATH='/Users/sambaiz/.local/share/mise/installs/node/22.17.0/bin:...'

$ which node
/Users/sambaiz/.local/share/mise/installs/node/22.17.0/bin/node

When you place a configuration file in the project directory, it merges with the parent configuration.

$ cat mise.toml 
[tools]
node = "18"
[env]
xxx = "yyy"
[tasks.build]
description = "Build"
run = "go build main.go"

$ mise i
mise [email protected] ✓ installed 

$ node --version
v18.20.8

$ echo $xxx
yyy

$ mise run build
[build] $ go build main.go

You can also write environment-specific configurations in mise.${MISE_ENV}.toml.

$ cat mise.prd.toml 
[env]
aaa = "bbb"

$ MISE_ENV=dev mise env | grep aaa
$ MISE_ENV=prd mise env | grep aaa
export aaa=bbb

Reference

mise ではじめる開発環境構築