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. mise exec
and run
Once mise
is installed, you can immediately start using it. mise
can be used to install and run tools, launch tasks, and manage environment variables.
The most essential feature mise
provides is the ability to run tools with specific versions. A simple way to run a shell command with a given tool is to use mise x|exec
. For example, here is how you can start a Python 3 interactive shell (REPL):
In the examples below, use
~/.local/bin/mise
(or the absolute path tomise
) ifmise
is not already onPATH
mise exec python@3 -- python
# this will download and install Python if it is not already installed
# Python 3.13.2
# >>> ...
or run node 22:
mise exec node@22 -- node -v
# v22.x.x
mise x|exec
is a powerful way to load the current mise
context (tools & environment variables) without modifying your shell session or running ad-hoc commands with mise tools set. Installing tools
is as simple as running mise use|u
.
mise use --global node@22 # install node 22 and set it as the global default
mise exec -- node my-script.js
# run my-script.js with node 22...
Another useful command is mise r|run
which allows you to run a mise task
or a script with the mise
context.
TIP
You can set a shell alias in your shell's rc file like alias x="mise x --"
to save some keystrokes.
3. Activate mise
optional
While using mise x|exec
is useful, for interactive shells, you might prefer to activate mise
to automatically load the mise
context (tools
and environment variables
) in your shell session. Another option is to use shims.
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. Note that shims do not support all the features ofmise activate
.
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.
Here is how you can activate mise
depending on your shell and the installation method:
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. You can run mise dr|doctor
to verify that mise is correctly installed and activated.
Now that mise
is activated or its shims have been added to PATH
, node
is also available directly! (without using mise exec
):
mise use --global node@22
node -v
# v22.x.x
Note that when you ran mise use --global node@22
, mise
updated the global mise
configuration.
[tools]
node = "22"
4. Next steps
Follow the walkthrough for more examples on how to use mise.
Set up the autocompletion
See autocompletion to learn how to set up autocompletion for your shell.
GitHub API rate limiting
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.