Getting Started
This will show you how to install mise and get started with it. This is a suitable way when using an interactive shell like bash
, zsh
, or fish
.
1. Install mise
CLI
See installing mise for other ways to install mise (macport
, apt
, yum
, nix
, etc.).
curl https://mise.run | sh
By default, mise will be installed to ~/.local/bin
(this is simply a suggestion. mise
can be installed anywhere). You can verify the installation by running:
~/.local/bin/mise --version
# mise 2024.x.x
~/.local/bin
does not need to be inPATH
. mise will automatically add its own directory toPATH
when activated.
mise
respects MISE_DATA_DIR
and XDG_DATA_HOME
if you'd like to change these locations.
2. Activate mise
Now that mise
is installed, you can optionally activate it or add its shims to PATH
.
mise activate
method updates your environment variable andPATH
every time your prompt is run to ensure you use the correct versions.- Shims are symlinks to the
mise
binary that intercept commands and load the appropriate environment
WARNING
Shims do not support all the features of mise activate
.
See shims vs path for more info.
For interactive shells, mise activate
is recommended. In non-interactive sessions, like CI/CD, IDEs, and scripts, using shims
might work best. You can also not use any and call mise exec/run
directly instead. See this guide for more information.
echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc
echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
echo '~/.local/bin/mise activate fish | source' >> ~/.config/fish/config.fish
Make sure you restart your shell session after modifying your rc file in order for it to take effect.
3. Using mise
INFO
Of course, if using mise solely for environment management or running tasks this step is not necessary. You can use it to make sure mise
is correctly setup.
As an example, here is how you can install node
and set it as the global default:
mise use --global node@22
You can now run node
using mise exec
:
mise exec -- node -v
# v22.x.x
TIP
Use mise x -- node -v
or set a shell alias in your shell's rc file like alias x="mise x --"
to save some keystrokes.
If you did activate mise
or add its shims to PATH
, then node
is also available directly!
node -v
# v22.x.x
Note that when you ran mise use --global node@22
, mise
updated the global mise
configuration.
[tools]
node = "22"
Follow the walkthrough for more examples on how to use mise.
WARNING
Many tools in mise require the use of the GitHub API. Unauthenticated requests to the GitHub API are often rate limited. If you see 4xx errors while using mise, you can set MISE_GITHUB_TOKEN
or GITHUB_TOKEN
to a token generated from here which will likely fix the issue. The token does not require any scopes.
Set up the autocompletion
See autocompletion to learn how to set up autocompletion for your shell.