Transparent shims
Opt-in shims let you type node, python or a tool alias directly, and still get the right runtime every time.
Enable
jrt shim enable # create the shim directory + one shim per registered tool
jrt shim add node npm npx python # shim runtime commands too
jrt shim path # shows the directory and the PATH line for your shellShims are never installed implicitly and jrt does not edit your PATH. Put the shim directory first on your PATH:
$shims = "$env:APPDATA\JervisRuntime\shims" # use the directory printed by jrt shim path
[Environment]::SetEnvironmentVariable('Path', "$shims;" + [Environment]::GetEnvironmentVariable('Path','User'), 'User')How a shim routes
When you run a shimmed command name, jrt resolves it in this order:
- Registered tool alias → runs like
jrt run <alias>: locked version, selected runtime. - Runtime command (
node,npm,pnpm,python,go,cargo, …) inside a project → runs likejrt exec --with the nearest.jrt.toml, includingpackageManagerrouting. - Anything else → the next executable with the same name on
PATHruns unchanged.
cd legacy-app && node -v # v18 (from .jrt.toml)
cd ~ && node -v # your system node, untouched
desktop-commander # registered tool, on its own runtime, from anywhereManaging shims
jrt shim list # each shim with ok / stale
jrt shim sync # recreate shims after upgrading jrt
jrt shim remove npx
jrt shim disable # remove all shimsTool shims are re-synchronized automatically after jrt tool add and jrt tool remove.
Behaviour details
- Windows: each shim is a hard link (or copy) of
jrt.exe, not a.cmdfile. Arguments are passed through without cmd.exe re-parsing, and Ctrl+C never asks “Terminate batch job?”. - Linux / macOS: each shim is a tiny POSIX
shscript thatexecs jrt. - The routed program’s exit code is returned unchanged, and jrt prints nothing extra when it fails.
- Arguments with spaces, empty strings and quotes arrive exactly as typed.
- Nested shim re-entry is bounded by
JRT_SHIM_DEPTH, so a misconfiguredPATHcannot loop forever.