Your first install
A two-minute walkthrough — install a package, look around, run a script.
This page assumes you have LPM installed. It will walk through installing a real package and getting a feel for how LPM lays things out.
A new project from scratch
mkdir hello-lpm && cd hello-lpm
lpm init -ylpm init -y creates a minimal package.json. Without -y it prompts for name, version, and a few defaults.
Install a dependency
lpm install zod ● Resolved 1 dep, 0 transitive (88 ms)
● Linked hoisted layout (12 ms)
+ zod ^4.3.6Open package.json — zod is now under dependencies with a caret range:
{
"dependencies": {
"zod": "^4.3.6"
}
}LPM's save policy writes ^resolvedVersion by default. To save exact, append --exact (or set save-exact = true in ~/.lpm/config.toml).
Two new files appear next to your package.json:
lpm.lock— human-readable, git-diffable lockfile. Commit this.lpm.lockb— binary mmap of the same data, for zero-parse warm starts. Commit this too.
node_modules/ starts hoisted by default (npm-style flat). Workspaces auto-flip to isolated (pnpm-style symlinks), and default installs with incompatible peer requirements auto-switch to isolated. Override per-invocation with --linker=isolated|hoisted.
Install everything from a manifest
If you cloned a project that already has a package.json:
lpm installResolves and installs every dep declared in package.json. If lpm.lock exists and is consistent with the manifest, the install is reproducible — the lockfile pins every transitive version and integrity hash.
Run a script
Add a script to package.json:
{
"scripts": {
"hello": "echo 'hi from lpm'"
}
}lpm run hello
# hi from lpmOr just lpm hello — lpm falls through to scripts as a top-level command, like npm run shorthand.
Look around the global store
Every package LPM downloads goes into a single content-addressable store at ~/.lpm/store/. Subsequent installs across other projects reuse the same on-disk copy via clonefile (macOS) or hardlinks (Linux), so a fresh lpm install of the same dep set is essentially free in disk and time.
lpm store verify # fast structural check (pass --deep for lockfile-backed SRI verify)
lpm cache prune # preview orphan entries no project references
lpm cache prune --apply # actually remove themSee Content-addressable store for the design.