mise activate
- Usage:
mise activate [FLAGS] [SHELL_TYPE] - Effect: read-only
- Source code:
src/cli/activate.rs
Print the script to activate mise in an interactive shell
Evaluate this command's output with the syntax for your shell; running it alone only prints the script. Activation updates tools and environment variables as this shell changes directories.
Add the appropriate example below once to your interactive startup file: ~/.bashrc for Bash, ~/.zshrc for Zsh, ~/.config/fish/config.fish for Fish, or $PROFILE for PowerShell. See the getting-started guide for other shells.
The mise executable must be on PATH before that line runs. Otherwise use its absolute path, for example eval "$(~/.local/bin/mise activate zsh)".
Use mise exec -- command for scripts and CI that do not need interactive hooks. Customize status output with the status settings.
Arguments
[SHELL_TYPE]— Shell type to generate the script forChoices:
bash,elvish,fish,nu,xonsh,zsh,pwsh,powershell
Flags
-q --quiet— Suppress non-error messages--no-hook-env— Do not automatically call hook-envThis can be helpful for debugging mise. If you run
eval "$(mise activate --no-hook-env)", then you can callmise hook-envmanually which will output the env vars to stdout without actually modifying the environment. That way you can do things likemise hook-env --traceto get more information or just see the values that hook-env is outputting.--shims— Use shims instead of modifying PATHEffectively the same as:
PATH="$HOME/.local/share/mise/shims:$PATH"mise activate --shimsdoes not support all the features ofmise activate. See https://mise.jdx.dev/dev-tools/shims.html#shims-vs-path for more information-h --help— Print help
Examples
Activate mise in Bash.
eval "$(mise activate bash)"Activate mise in Zsh.
eval "$(mise activate zsh)"Activate mise in Fish.
mise activate fish | sourceActivate mise in Xonsh.
execx($(mise activate xonsh))Activate mise in PowerShell.
(&mise activate pwsh) | Out-String | Invoke-Expression