mise/Shim
Properties
What Is a Shim in mise? Shims | mise-en-place
Overview
- A shim is a tiny executable that masquerades as the tool you want to run (e.g.
node,prettier). Each shim is a symlink to themisebinary that intercepts your shell call, figures out which version of the tool should run, loads the declared mise/Environment changes, and then delegates execution. See Shims in the mise docs.
- A shim is a tiny executable that masquerades as the tool you want to run (e.g.
Context
- mise/activate rewrites Shell/PATH on every prompt; this is great for interactive shells but unavailable to non-interactive environments like CI, IDEs, or scripts. Shims offer a static directory of stand-ins that works even when the shell cannot evaluate
mise activate. See Shims vs PATH activation. - By default, shims live in
~/.local/share/mise/shims. Adding this directory toPATH(or usingmise activate --shims) makes every installed tool appear globally available. See mise activate --shims.
- mise/activate rewrites Shell/PATH on every prompt; this is great for interactive shells but unavailable to non-interactive environments like CI, IDEs, or scripts. Shims offer a static directory of stand-ins that works even when the shell cannot evaluate
Key Principles
- One shim per binary – every
binfile provided by a tool gets its own shim at install time. - Environment on demand – mise/Config/mise.toml/env load only when a shim runs; they are not present for unrelated commands. See Shims: Environment.
- Reshim after changes – installing via managers that mise cannot detect (e.g.
yarn,pnpm) may require a manualmise reshimto regenerate the shim set. Seemise reshimcommand.
- One shim per binary – every
Mechanism
- Creation –
mise install(or any tool install) drops binaries, then writes matching shims;mise reshimcan recreate them later. See Shims: Creation. - Resolution flow
- Symlink anatomy
- Creation –
Examples
- Listing versions via a shim path
- Force-update shims after a global
npm i -g- sh
mise reshim # recreates all shims - See
mise reshimdocumentation.
Misconceptions
- "Shims give me every mise feature." Not quite: hooks, some env-vars, and
whichaccuracy are limited under shims. See Shims: Limitations. - "
which nodeshows the real binary." It shows the shim; usemise which nodeto see the resolved path. See FAQ: which node. - "Shims always outperform
mise activate." Both pay a small cost—activateon each prompt, shim on each invocation; impact depends on workflow. See Shims: Performance.
- "Shims give me every mise feature." Not quite: hooks, some env-vars, and
Related
- Shims vs PATH activation – trade-offs and limitations
mise reshimcommand – manual shim regenerationmise activate --shims– add shim dir toPATHautomatically