LPM-cli

lpm use

Install, pin, list, and remove managed Node.js and Bun runtimes.

lpm use <runtime>@<version>      # install + pin
lpm use --list [runtime]         # list installed versions
lpm use remove <runtime>@<spec>  # remove installed versions matching a spec

Installs and pins managed runtimes under ~/.lpm/runtimes/. Supported runtimes are node and bun.

After lpm use node@22, scripts run with the pinned Node version via PATH injection. After lpm use bun@1.3.14, scripts can call bun from the managed Bun install. runtime.bun does not make LPM execute scripts through bun run; lpm run still uses LPM's runner and exposes Bun on PATH.

For project environment variables and secrets management, see lpm env.

Installing Node

lpm use node@22                # install + pin Node 22 (resolves to latest 22.x)
lpm use node@lts               # install + pin the latest LTS
lpm use node@22.12.0           # install + pin an exact version
lpm use node@22 --pin          # already installed — pin the concrete version, no download

Versions land under ~/.lpm/runtimes/node/. lpm use node@22 resolves the spec, downloads the build for your platform if missing, then writes the pin to lpm.json:

lpm.json
{ "runtime": { "node": "22.12.0" } }

When lpm.json > runtime.node is absent, detection falls back through package.json > engines.node, then .nvmrc, then .node-version. See Managed runtimes for the full ladder.

Installing Bun

lpm use bun@1.3.14             # install + pin an exact Bun version
lpm use bun@latest             # install + pin the latest Bun release
lpm use bun@1.3 --pin          # pin a matching installed 1.3.x version

Versions land under ~/.lpm/runtimes/bun/. lpm use bun@1.3.14 writes:

lpm.json
{ "runtime": { "bun": "1.3.14" } }

Bun specs accept exact versions, v1.3.14, bun-v1.3.14, latest, major/minor prefixes, and semver ranges. Bun does not have an LTS channel, so bun@lts is rejected.

runtime.bun is read only from lpm.json. package.json > engines.bun is surfaced as a compatibility warning but is not enforced.

Listing Installed Versions

lpm use --list                 # list installed Node versions
lpm use --list node            # same
lpm use --list bun             # list installed Bun versions

With --json, the envelope includes the selected runtime:

{ "success": true, "runtime": "bun", "versions": ["1.3.14"] }

Removing Installed Versions

lpm use remove node@20         # remove all installed 20.x Node runtimes
lpm use remove bun@1.3         # remove all installed 1.3.x Bun runtimes
lpm use remove bun@1.3.14      # remove one exact Bun runtime

Removal matches the local managed runtime set only. Exact versions remove one installed runtime. Prefixes and semver ranges remove every installed version that satisfies the spec.

lpm use remove accepts explicit versions, prefixes, and semver ranges. It does not accept node@lts, node@latest, bun@lts, or bun@latest because removal must be deterministic against the local install set.

Removing a managed runtime does not rewrite lpm.json. If the project still pins a matching runtime, LPM warns because the next lpm run / lpm dev / lpm install path that needs that pin can auto-install it again.

Flags

FlagEffect
--listList installed versions for the runtime
--pinPin only. Exactizes to an installed version when one already matches; otherwise stores the requested spec without downloading
--removeRemove installed managed runtimes matching a spec. lpm use remove bun@1.3 is the preferred explicit command form.

Plus the global flags.

See Also

  • lpm env — project environment variables and secrets
  • lpm dev — picks up runtime pins automatically
  • Managed runtimes — how pins propagate to scripts