Our onboarding doc used to have a section per language. Install nvm and add its loader. Install pyenv and its init line. Install SDKMAN for the JVM service. Install Terraform at a specific version from a zip file. New engineers spent their first morning debugging shell startup files, and every terminal tab paid for three init scripts.
mise and asdf replace that stack with one tool and one per-project file listing every runtime the project needs. This guide compares them, shows the file formats, walks through how we migrated about thirty engineers off nvm and pyenv, and covers CI.
The idea both share
Both tools work from a project file that pins versions for many tools at once. Enter the directory and every listed tool resolves to the pinned version. Leave it and you get your global defaults.
asdf's file is .tool-versions, a plain list:
nodejs 22.12.0
python 3.12.8
java temurin-21.0.5+11.0.LTS
terraform 1.9.8
mise reads .tool-versions too, and has its own TOML format with more features:
[tools]
node = "22.12.0"
python = "3.12.8"
java = "temurin-21.0.5+11.0.LTS"
terraform = "1.9.8"
[env]
DATABASE_URL = "postgres://localhost:5432/app_dev"
Tool names differ slightly between the two ecosystems (nodejs in asdf, node in mise), and mise maps asdf names when reading .tool-versions, so a shared file works for both.
How they differ
Topic | asdf | mise |
|---|---|---|
Implementation | Go (since 0.16, previously shell scripts) | Rust |
Project file |
|
|
Plugins | Plugin repo per tool, installed explicitly | Built-in core tools plus backends (asdf plugins, aqua, ubi, npm, pipx, cargo, go) |
How versions are applied | Shims on |
|
Env vars per project | No (plugins like direnv do it) |
|
Tasks | No |
|
Reads | Via plugin settings | Supported, opt-in per tool |
asdf 0.16 rewrote the tool in Go and changed some commands. Notably, asdf global and asdf local were replaced by asdf set (with -u for the user-level file). If your docs or scripts were written for the shell version, update them when you upgrade.
Shims vs activation
This is the most practical difference.
Shims (asdf, or mise with mise activate --shims) put a directory of tiny wrapper scripts on PATH. Running node executes the shim, which looks up the version for the current directory and runs the real binary. They work in any process that inherits PATH, including IDEs, make, cron jobs and git hooks. Each call pays a small lookup cost, and tools that look for node in their own way may see the shim rather than the real binary.
Activation (mise's default) adds a hook to your shell prompt. When you change directory, mise rewrites PATH to point straight at the right tool directories. No wrappers, so which node shows the real binary and there is no per-call overhead. But only processes started from an activated interactive shell see it. GUI-launched IDEs and non-interactive scripts do not.
We set up mise with activation in interactive shells and shims for everything else:
# ~/.zshrc (interactive)
eval "$(mise activate zsh)"
# ~/.zprofile (login shells, IDEs started from the Dock)
eval "$(mise activate zsh --shims)"
mise doctor reports whether activation and shims are wired up as expected.
Day-to-day commands
mise use node@22.12.0 # pin in ./mise.toml and install
mise use -g python@3.12 # set global default
mise install # install everything the project file lists
mise ls # installed and active versions
mise exec -- node -v # run with project tools without activation
mise trust # approve a new mise.toml with [env] or tasks
mise trust exists because a mise.toml can set environment variables and define tasks; mise asks before applying config from a directory you have not approved. Do not trust config from repositories you have not read.
The asdf equivalents:
asdf plugin add nodejs
asdf install nodejs 22.12.0
asdf set nodejs 22.12.0 # writes ./.tool-versions
asdf install # install everything listed
asdf current
Migrating from nvm and pyenv
We moved the team in a week, one repository at a time, without forcing anyone to change on day one.
1. Add a project file next to the old ones. Keep .nvmrc and .python-version for people still on nvm and pyenv, and add mise.toml with the same versions. Alternatively, enable mise's support for those files:
mise settings add idiomatic_version_file_enable_tools node
mise settings add idiomatic_version_file_enable_tools python
That lets mise read .nvmrc and .python-version directly, so there is only one source of truth during the transition.
2. Install mise and remove the old init lines. Delete the nvm loader, the pyenv init and SDKMAN's init from shell files. Running them alongside mise reintroduces exactly the PATH-order bugs you are trying to remove.
3. Reinstall tool versions under mise. mise install in each project downloads what it needs. Python may compile from source depending on settings; mise can use precompiled builds, which avoid the missing-module problems of source builds on fresh machines.
4. Reinstall global CLIs. Global npm packages and pipx tools installed under nvm or pyenv do not move. mise can manage some directly (mise use -g npm:prettier, mise use -g pipx:black), which makes them visible and pinned.
5. Remove the old managers once nobody's type -a node shows an nvm path. rm -rf ~/.nvm ~/.pyenv frees several gigabytes on most laptops.
6. Delete legacy files from repositories once every developer and CI job uses mise. One file is the goal.
CI and caching
mise publishes a GitHub Action that installs mise, runs mise install and caches the install directory:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
cache: true
- run: node -v && python --version
- run: mise run test
The cache key includes the project config, so changing a version invalidates it. For other CI systems, install mise in the base image, cache ~/.local/share/mise keyed on a hash of mise.toml or .tool-versions, and run mise install before your build. With a warm cache, our setup step dropped from about two minutes (installing Node, Python and Terraform separately) to under ten seconds.
asdf in CI follows the same pattern: install asdf, add plugins, asdf install, and cache ~/.asdf/installs.
Add GITHUB_TOKEN or the equivalent to the environment in CI. Several backends download from GitHub releases, and anonymous API rate limits fail builds intermittently on shared runners.
Which to choose
Already on asdf and happy? Stay. Upgrade to the Go version and update scripts that call
asdf globalorasdf local.Starting fresh, or tired of shell init cost? mise. Faster, more batteries included, reads your existing files.
Need per-project env vars and tasks? mise's
[env]and[tasks]replace direnv and a chunk of Makefile for many projects, though keep secrets out of committed config.Strict, auditable installs? Pin exact versions in either tool, review plugin and backend sources, and consider mise's lockfile support if your version provides it.
Common mistakes
Mistake | Why it hurts | Do this instead |
|---|---|---|
Keeping nvm or pyenv init alongside mise | PATH order fights, wrong versions | Remove old init lines |
Activation only, IDE launched from Dock | IDE sees system tools | Add shims for login shells |
Committing secrets in | Leaks credentials to the repo | Use |
Loose versions like | Different patch versions per laptop | Pin exact versions for apps |
No CI cache | Minutes of downloads per job | Use the action cache or cache the install dir |
Key takeaways
One project file can pin every runtime;
.tool-versionsworks for both asdf and mise.asdf uses shims; mise defaults to shell activation and can add shims for non-interactive use.
Migrate gradually: add the new file, then remove old init lines, then the old tools.
Review
mise trustprompts; config can set env vars and tasks.Cache installs in CI and supply a GitHub token to avoid rate limits.
References
mise documentation: https://mise.jdx.dev/
mise configuration (
mise.toml, idiomatic version files): https://mise.jdx.dev/configuration.htmlmise shims vs activation: https://mise.jdx.dev/dev-tools/shims.html
mise continuous integration: https://mise.jdx.dev/continuous-integration.html
asdf documentation: https://asdf-vm.com/
asdf 0.16 upgrade guide: https://asdf-vm.com/guide/upgrading-to-v0-16.html
jdx/mise-action: https://github.com/jdx/mise-action
Comments
0No comments yet. Be the first to comment!
Sign In to post a comment.