Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

iki/mise-shim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mise-shim

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.exe is now part of mise since jdx/mise#8045 released in v2026.2.7: Windows Gets Real

As of v2026.2.8, mise doesn't yet download/update mise-shim.exe as a part of mise self-update, so you can download the latest release windows zip manually and place the shim next to mise.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 using winget install jdx.mise instead, as it uses symlinks and avoids double shim on each tool execution.

Content

Purpose

Current cmd/bash shims in mise have several issues:

  • Globally installed bun packages need bun.exe in 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 call to 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

Concept

The shim uses its own filename (without .exe) to determine which tool to execute:

  1. When you run node.exe, the shim detects it should run node
  2. It invokes mise x -- node <args> to execute the tool in mise's environment
  3. All command-line arguments and exit codes are forwarded transparently

Getting Started

  1. Download reshim.cmd
    • Alternatively, clone this repository for building from source
  2. Download mise-shim.exe from the latest release
    • Alternatively, build the shim from source

Usage

Run the reshim.cmd script to create executable shims for all mise tools:

reshim.cmd

After rebuild, use -f option to update existing executable shims:

reshim.cmd -f

Use -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

Development

Prerequisites

  1. Install Rust and UPX via mise:

    mise use -g rust upx
  2. Install Visual Studio C++ Build Tools:

    Option A: Using Chocolatey (recommended):

    choco install visualstudio2022-workload-vctools --package-parameters "--includeRecommended"

    Option B: Manual installation:

Build

Run the build.cmd script:

build.cmd

Build script will perform the following steps:

  1. Initialize the Visual Studio build environment using vc.cmd
  2. Compile the Rust code in size-optimized portable release mode
  3. Compress the executable with UPX
  4. Output the final mise-shim.exe

Technical Details

  • 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)

License

MIT License, see LICENSE.md for details.