Mise Environment Management
Use this skill whenever a task involves installing or switching versions of developer tools. Prefer mise unless the user explicitly requires another manager or the tool is not supported by mise.
Core Rules
- Prefer
miseover tool-specific managers such asnvm,pyenv,rbenv,sdkman, or manual tarball installers. - When a command fails because of a version mismatch, treat the runtime or CLI version as part of the root cause and fix it with
mise. - For Python workflows, use
miseto choose the Python version but useuv run ...to execute Python commands whenever the project usesuv. - Prefer project-local versions for repository work and global versions for workstation defaults.
- If
miseis not activated in the shell, usemise exec ... -- <command>for one-off runs instead of assuming the PATH is already correct. - When a language or CLI is not already covered by local examples, check the official docs at https://mise.jdx.dev/getting-started.html and the registry/backends pages before falling back to another installer.
Default Workflow
1. Verify mise
mise --version
mise doctor
If mise is not installed yet, use:
curl https://mise.run | sh
~/.local/bin/mise --version
If shell activation is needed for interactive use, add the snippet to the shell rc file and restart the shell:
# zsh
echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
# bash
echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc
Without activation, use mise exec -- <command> for every invocation or prefix all commands with ~/.local/bin/mise exec --.
2. Decide scope
Use global scope for machine-wide defaults:
mise use --global node@22
Use local scope for a repository or project:
mise use node@22
mise install
This writes the tool version to the local mise.toml or the global config and makes the version choice explicit.
3. Run with the correct version
For one-off commands or shells that are not activated:
mise exec node@22 -- node -v
mise exec python@3.12 -- uv run python --version
For an already configured project:
mise exec -- node -v
mise exec -- uv run python --version
If the repository already uses uv, prefer uv run pytest, uv run python -m ..., and similar forms over raw python execution.
Common Tasks
Install a runtime or language
Check available versions first when precision matters:
mise latest node
mise latest bun
mise ls-remote python
Install globally:
mise use --global java@openjdk-21
mise use --global rust@latest
mise use --global bun@1.3.13
mise use --global node@22
After installation, verify with the real executable:
java --version
rustc --version
bun --version
node --version
which node
Rust may still resolve to binaries under .cargo/bin; that is expected for the Rust toolchain.
macOS: Java system integration (optional)
After installing Java, mise may suggest creating a symlink so that IDEs and /usr/libexec/java_home can discover the JDK:
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-21.0.2.jdk
sudo ln -s ~/.local/share/mise/installs/java/openjdk-21.0.2/Contents \
/Library/Java/JavaVirtualMachines/openjdk-21.0.2.jdk/Contents
This is optional for command-line use but required for tools that rely on the system Java registry.
Fix a version mismatch
When a project expects a different version than the current shell:
- Identify the required version from the error, project files, CI config, or lockfiles.
- Set the version with
mise use <tool>@<version>inside the repository. - Run
mise installif the tool is not already installed. - Re-run the failing command through
mise exec -- ...if shell activation is uncertain.
Example:
mise use python@3.12
mise install
mise exec -- uv run python -m pytest
If the shell is already activated and the repository is using uv, the equivalent command is:
uv run python -m pytest
Python-specific rule
For Python projects:
- Use
miseto pin the interpreter version. - Use
uvto create and run the Python environment. - Prefer
uv run <command>over callingpython,pip, orpytestdirectly. - If packages need to be added, prefer
uv addor the repository's existinguvworkflow.
Example:
mise use python@3.12
mise install
uv run python --version
uv run pytest
Install CLIs from non-core backends
Use the backend prefix when the tool is distributed through npm, pipx, GitHub releases, aqua, or another backend.
mise use --global npm:@anthropic-ai/claude-code
mise use --global pipx:black
mise use --global github:BurntSushi/ripgrep
If you are not sure which backend to use, check the mise docs and registry before proposing another installer.
Troubleshooting
mise command not found
Use the full path first:
~/.local/bin/mise --version
Then configure shell activation or PATH according to the official docs.
Version still looks wrong
Run these checks:
mise current
mise which node
which node
mise exec -- node -v
If which and mise which disagree, the shell likely is not activated or another manager is earlier on PATH.
For Python, also verify through uv:
mise which python
uv run python --version
uv run which python
Project config trust prompt
If a checked-in mise.toml prompts for trust, review it and then run:
mise trust
Decision Guide
- Use
mise use --global ...for personal machine defaults. - Use
mise use ...in a project when the repo needs a pinned version. - Use
mise exec ... -- ...for one-off commands, CI-like execution, or when PATH setup is uncertain. - For Python projects that use
uv, run Python commands withuv run ...after selecting the interpreter version withmise. - Use
mise installafter editing or creatingmise.tomlmanually. - Use the official docs when a language, backend, activation flow, or plugin behavior is unclear.
Response Pattern
When helping a user, prefer this order:
- Confirm whether the need is install, upgrade, downgrade, or version alignment.
- Choose global or local scope.
- Use
misecommands to install or switch versions. - For Python, route execution through
uv run ...after the version is pinned. - Verify the active version with the real executable.
- Re-run the original command with
mise exec -- ...if activation is uncertain.
Official References
- Getting started: https://mise.jdx.dev/getting-started.html
- Registry: https://mise.jdx.dev/registry.html
- Backends: https://mise.jdx.dev/dev-tools/backends/
- Tool versions index: https://mise-versions.jdx.dev/