vp-env
Manage Node.js and package manager runtimes for Vite+
TLDR
SYNOPSIS
vp env [command] [options] [arguments]
DESCRIPTION
vp env manages the JavaScript environment used by vp: one Node.js runtime and one selected package manager (npm, pnpm, Yarn, or Bun as peer families). It is a vp subcommand on the global CLI, not a separate binary, and it is not included in the project-local `vite-plus` package.In managed mode (the default after environment setup), shims named node, npm, pnpm, yarn, and bun launch the versions chosen for the current project. vp install uses the selected package manager; invoking pnpm directly always runs pnpm, even in a project that selected npm.Node.js is resolved by walking from the current directory upward. In each directory the first of `.node-version`, `package.json` `devEngines.runtime`, `engines.node`, then `.nvmrc` wins. If nothing declares a version, the global default is used, then the latest LTS.Package-manager selection, in order: an explicit command override, `VPPACKAGEMANAGER`, top-level `packageManager`, `devEngines.packageManager`, lockfile or manager-specific config, that family's global default, then the family's latest release (Node's bundled npm for the npm shim).Most subcommands act on both components unless given node, pm, or a family name. Unqualified versions are Node.js.
PARAMETERS
setup [--refresh] [--env-only]
Create or update `node`, `npm`, `pnpm`, `yarn`, `bun` (and alias) shims, and write shell setup scripts. --refresh recreates shims from saved preferences. --env-only writes env files without shims or install instructions.on [scope]
Enable managed mode so shims resolve through Vite+. With no scope, both Node.js and all package managers. scope is node, pm, npm, pnpm, yarn, or bun.off [scope]
Prefer system tools, falling back to managed installs. Same scope values as on.print [scope]
Print PATH setup for the resolved environment.default [specs...] [--unset]
Show or set global fallbacks. A bare version selects Node.js; `pnpm@10` sets only that family's default. lts and latest (and package-manager dist-tags) re-resolve on each use. --unset clears defaults unless scoped.pin [specs...] [--unpin] [--no-install] [--force] [--target source]
Write project pins. Bare versions are Node.js; `name@version` is a package manager. Updates an existing `.node-version` or effective `.nvmrc`, otherwise `devEngines`. --target is node-version, nvmrc, dev-engines, or package-manager. --unpin removes pins (same as unpin).unpin [scope] [--target source]
Remove effective project pins. Does not delete lower-priority declarations.use [specs...] [--unset] [--no-install] [--silent-if-unchanged]
Override versions for this shell (`VPNODEVERSION`, `VPPNPMVERSION`, and the other family variables). Does not set `VPPACKAGEMANAGER`. --unset clears session overrides.install, i [specs...]
Download the resolved environment, a selected component, or explicit specs.uninstall, uni specs...
Remove installed versions. Bare versions and tags such as lts select Node.js. Package managers need a qualified exact version (`pnpm@10.18.0`).clean [scope]
Remove unused managed installs. Current and configured-default versions are kept.exec, run [--node version] [--package-manager spec] [--npm version] command...
Run a command in the resolved or overridden environment. --npm is an alias for --package-manager npm@version.current [scope] [--json]
Show the resolved Node.js and package-manager environment.doctor [scope]
Diagnose resolution, shims, PATH, and conflicting version sources.which tool
Print the path of the shim-resolved binary (node, npx, pnpm, …).list, ls [scope] [--json]
List locally installed Node.js, npm, pnpm, Yarn, and Bun versions.list-remote, ls-remote [values...] [--lts] [--all] [--json] [--sort asc|desc]
List versions available from registries. --lts implies Node.js.
CONFIGURATION
.node-version
Exact Node.js version for this directory. Preferred write target when the file already exists..nvmrc
nvm-compatible Node.js version file. Updated when it is the effective source in the current directory.package.json
`devEngines.runtime`, `engines.node`, `packageManager`, and `devEngines.packageManager`.pnpm-workspace.yaml
When Vite+ and pnpm both manage runtimes, set `runtimeOnFail: ignore` and `pmOnFail: ignore` (pnpm 11+) so pnpm does not download a second Node.js or switch package-manager versions. On pnpm 10 the matching setting is `managePackageManagerVersions`.VP_NODE_VERSION / VP_NPM_VERSION / VP_PNPM_VERSION / VP_YARN_VERSION / VP_BUN_VERSION
Session overrides for the matching shims. vp env use sets these.VP_PACKAGE_MANAGER
Selects the manager for vp install and related commands. Direct shims ignore it.VP_NODE_DIST_MIRROR
Alternate Node.js distribution URL (default `https://nodejs.org/dist`).VP_HOME
Single-root install layout. Otherwise data lives under XDG directories (`~/.local/share/vite-plus` and related paths).
INSTALL
CAVEATS
Requires the global vp CLI. A project-local `vite-plus` install cannot run vp env.Windows cmd.exe cannot apply use in the current session; use vp-use.cmd. PowerShell must dot-source the generated `env.ps1`. In CI, use writes session files under the state directory that later shims read.use does not set or clear `VPPACKAGEMANAGER`. Each package-manager family has its own override.clean keeps versions that are currently in use or set as defaults.Official `nodejs.org` downloads verify the PGP-signed `SHASUMS256.txt.asc` before the archive checksum. Custom mirrors that publish only `SHASUMS256.txt` fall back to checksum-only verification.On Alpine Linux, install `libstdc++` before using managed Node.js (unofficial musl Node builds link the GNU C++ library).
HISTORY
vp env shipped with the global vp CLI as part of Vite+ (VoidZero). The public beta was 2 July 2026. Vite+ 1.0 (28 September 2026) added vp env doctor alongside Homebrew and Docker distribution.
