Repository navigation
✨ New Features
mvm shell <version> — per-terminal version activation (PowerShell only): Activate a specific Node version for the current terminal session only, without touching the global version used by every other window. Perfect for running different apps that need different Node versions side-by-side without constantly switching the global default.
mvm shell --unset / mvm shell off: Instantly revert the current terminal back to the global version without closing it. (Closing the terminal always reverts automatically too, since the override is session-scoped.)
Resolves aliases and partial versions: mvm shell 20, mvm shell lts/*, etc. work the same way mvm use does — resolved against installed versions first.
Non-intrusive PATH override: Implemented via a lightweight PowerShell profile function ($PROFILE) that shadows mvm only inside PowerShell sessions, intercepting just the shell subcommand and transparently forwarding everything else to mvm.ps1 unchanged. mvm.cmd and all cmd.exe/CI/non-PowerShell usage remain completely untouched.
Zero admin requirement, by design: Both the profile write and the required execution-policy adjustment use CurrentUser scope exclusively — fully consistent with MVM's no-admin philosophy (unlike nvm-windows). mvm setup now also persists MVM_ROOT as a user environment variable so the profile function can always locate mvm.ps1.
Visibility in existing commands: mvm current and mvm which now surface an active shell-level override when one is set, showing both the override and the underlying global version for clarity.
New internal command — resolve-shell: Added as a lightweight, output-only resolver used internally by the profile function; not intended for direct interactive use (documented as such).
🛠 Changes to Existing Commands
mvm setup now does more:
- Adds/repairs the User PATH entries (unchanged behavior).
- Sets CurrentUser execution policy to
RemoteSignedif currentlyRestricted/Undefined, required for the profile script to load (admin-free). - Installs or refreshes a clearly delimited
mvm shellfunction block in the user's PowerShell$PROFILE, safe to re-run without duplicating or clobbering existing profile content. - Persists
MVM_ROOTfor use by the profile function.
📝 Documentation
- Updated
mvm helpwithmvm shell VERSIONandmvm shell --unsetusage, plus a note thatmvm shellis PowerShell-only and requires opening a new window after runningmvm setup. - Added a note clarifying that users running both Windows PowerShell 5.1 and PowerShell 7 should run
mvm setuponce from each host, since$PROFILEresolves to a different file per host version. - Updated README with
mvm shellusage examples and an explanation of how it differs frommvm use(global, persistent) and.mvmrc/.nvmrc(project-local, automatic).
⚠️ Known Limitations
mvm shellonly works in PowerShell sessions.cmd.exe, Git Bash, and other shells are unaffected and continue to rely onmvm usefor switching versions.- On machines where execution policy is enforced machine-wide via Group Policy, CurrentUser scope may be overridden by IT policy — this is a Windows/GPO limitation outside MVM's control, not specific to this feature.