Thanks to visit codestin.com
Credit goes to mise.jdx.dev

Skip to content

Shell Activation experimental

mise can declaratively add shell activation snippets for bash, zsh, and fish with [bootstrap.mise_shell_activate]. Configure startup-file targets directly when you want separate shims and normal activation setup:

toml
[bootstrap.mise_shell_activate]
zprofile = "shims"
zshrc = "activate"
bash_profile = "shims"
bashrc = "activate"
fish = "activate"

Use compact table form when you want a shape that can accept future options:

toml
[bootstrap.mise_shell_activate]
zprofile = {enabled = true, mode = "shims"}
zshrc = {enabled = true, mode = "activate"}

Shell keys are shortcuts. For example, zsh = true expands to zprofile = "shims" and zshrc = "activate".

Any target can use either "activate" or "shims". Boolean true enables the target with its default mode, and false disables it.

mise bootstrap mise-shell-activate apply writes marker-delimited blocks to the shell rc file:

TargetShellDefault modeTarget fileBlock
bash_profilebashshims~/.bash_profileeval "$(mise activate bash --shims)"
bashrcbashactivate~/.bashrceval "$(mise activate bash)"
zprofilezshshims~/.zprofileeval "$(mise activate zsh --shims)"
zshrczshactivate~/.zshrceval "$(mise activate zsh)"
zshenvzshshims~/.zshenveval "$(mise activate zsh --shims)"
fishfishactivate~/.config/fish/config.fishmise activate fish | source

The markers are the same edit markers used by Dotfiles:

sh
# >>> mise:activate >>> managed by mise - do not edit between markers
eval "$(mise activate zsh)"
# <<< mise:activate <<<

Semantics

[bootstrap.mise_shell_activate] follows the same manual, idempotent model as other bootstrap sections:

  • Per-target override - a project config can override a global setting for one startup file with zshrc = false without changing zprofile.
  • Manual application only - mise never edits shell rc files implicitly. Only mise bootstrap mise-shell-activate apply and mise bootstrap apply this section.
  • Marker-owned edits - mise only owns the block between its markers. Other content in the rc file is left untouched.
  • Shims stay out of zshenv by default - zshenv is supported when configured explicitly, but shell shortcuts do not write it because zsh reads it for every invocation, including scripts.
  • Explicit dotfiles win - if [dotfiles] already manages the same rc file as a whole file, or defines an edit for the same target/id such as "~/.zshrc/activate", mise skips the generated shell activation entry for that shell.

For fully managed rc files or custom activation blocks, use [dotfiles] directly instead.

Commands

sh
mise bootstrap mise-shell-activate status            # shows activation block state
mise bootstrap mise-shell-activate status --json     # machine-readable
mise bootstrap mise-shell-activate status --missing  # exit 1 if anything is out of sync

mise bootstrap mise-shell-activate apply           # writes missing/different blocks
mise bootstrap mise-shell-activate apply --dry-run # print the edits instead
mise bootstrap mise-shell-activate apply --yes     # skip the confirmation prompt

JSON status entries include target, shell, path, mode, and state. state is "missing" | "applied" | "differs" | "source_missing". Entries with state = "differs" also include a reason field.

MIT LicenseCopyright © 2026en.dev