Executable Windows shim for mise tools
Fully usable prove-of-concept, ready for use in local dev env
Based on @daief solution for node shim issues
Note: Windows binary shim
mise-shim.exeis now part of mise since jdx/mise#8045 released in v2026.2.7: Windows Gets RealAs of v2026.2.8, mise doesn't yet download/update
mise-shim.exeas a part ofmise self-update, so you can download the latest release windows zip manually and place the shim next tomise.exe.
- Also, if you used chocolatey to install mise, put the shim in
%ProgramData%\chocolatey\lib\mise\<arch>instead of%ProgramData%\chocolatey\bin. However, it's better to install mise usingwinget install jdx.miseinstead, as it uses symlinks and avoids double shim on each tool execution.
Current cmd/bash shims in mise have several issues:
- Globally installed bun packages need
bun.exein PATH - Spawning tools like Node from JavaScript has to be updated with
{ shell: true }to work with cmd/bash shims - Calling tools from cmd scripts has to be updated to use
callto work with cmd/bash shims, otherwise the script will exit after the tool is called - There may be many other cases where the tool executables are expected to be in PATH, which is their default installation mode
Executable shims are battle tested practice on Windows. They are used for example by Bun, Volta, and Chocolatey
The shim uses its own filename (without .exe) to determine which tool to execute:
- When you run
node.exe, the shim detects it should runnode - It invokes
mise x -- node <args>to execute the tool in mise's environment - All command-line arguments and exit codes are forwarded transparently
- Download
reshim.cmd- Alternatively, clone this repository for building from source
- Download
mise-shim.exefrom the latest release- Alternatively, build the shim from source
Run the reshim.cmd script to create executable shims for all mise tools:
reshim.cmdAfter rebuild, use -f option to update existing executable shims:
reshim.cmd -fUse -h option for help:
Usage: reshim [options] [shims-path=%LocalAppData%\mise\shims]
Copy executable shim `mise-shim.exe` to .exe shim in mise shim-path
for all .cmd shims that do not already have .exe shim there
Remove all existing .exe shims in mise shim-path
that do not have matching .cmd shim there (were uninstalled)
Options:
-f Overwrite existing .exe shims. Use after rebuild
-h Show this help and exit
-
Install Rust and UPX via mise:
mise use -g rust upx
-
Install Visual Studio C++ Build Tools:
Option A: Using Chocolatey (recommended):
choco install visualstudio2022-workload-vctools --package-parameters "--includeRecommended"Option B: Manual installation:
- Download https://aka.ms/vs/stable/vs_BuildTools.exe
- Run the installer and select "Desktop development with C++"
Run the build.cmd script:
build.cmdBuild script will perform the following steps:
- Initialize the Visual Studio build environment using vc.cmd
- Compile the Rust code in size-optimized portable release mode
- Compress the executable with UPX
- Output the final
mise-shim.exe
- Language: Rust
- Target: Windows only (
x86_64-pc-windows-msvc) - Size: 84 KB, which could be improved, Bun shims have 15 KB (7 KB compressed)
MIT License, see LICENSE.md for details.