# Commands (/docs/commands)



A flat reference of every top-level command. Each row links to the command's detail page; aliases are noted in parentheses.

## Package management [#package-management]

| Command                                                      | What it does                                                                         |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| [`lpm install`](/docs/packages/install) (`i`)                | Install dependencies from `package.json`, or add new ones                            |
| [`lpm fetch`](/docs/packages/fetch)                          | Download lockfile packages into the store without installing                         |
| [`lpm tidy`](/docs/packages/tidy)                            | Find unused dependency declarations and undeclared imports                           |
| [`lpm add`](/docs/packages/add)                              | Source delivery — copy package source into your project (any registry)               |
| [`lpm remove`](/docs/packages/remove) (`rm`)                 | Remove a package previously brought in via `lpm add`                                 |
| [`lpm uninstall`](/docs/packages/uninstall) (`un`, `unlink`) | Remove from `dependencies` and `node_modules`                                        |
| [`lpm version`](/docs/packages/version)                      | Bump `package.json` version, optionally commit and tag                               |
| [`lpm release`](/docs/packages/release)                      | Plan, apply, and publish workspace releases in dependency order                      |
| [`lpm publish`](/docs/packages/publish) (`p`)                | Publish to LPM.dev Registry (or `--npm` / `--github`)                                |
| [`lpm stage`](/docs/packages/stage)                          | Stage, inspect, approve, or reject npm staged publishes                              |
| [`lpm upgrade`](/docs/packages/upgrade)                      | Upgrade eligible LPM.dev Registry and npm dependencies, optionally scoped by package |
| [`lpm outdated`](/docs/packages/outdated)                    | Show dependencies with newer versions available                                      |
| [`lpm audit`](/docs/packages/audit)                          | Security + quality audit, with direct-dependency fixes                               |
| [`lpm search`](/docs/packages/search)                        | Search npm, custom registries, or LPM.dev Registry by query route                    |
| [`lpm info`](/docs/packages/info)                            | Metadata for a package from npm, custom registries, or LPM.dev Registry              |
| [`lpm quality`](/docs/packages/quality)                      | Quality report for a package                                                         |
| [`lpm query`](/docs/packages/query)                          | CSS-like selector queries on installed packages                                      |
| [`lpm graph`](/docs/packages/graph) (`ls`)                   | Dependency tree (`--format dot`, `mermaid`, `json`, `stats`, `html`)                 |
| [`lpm why`](/docs/packages/graph#lpm-why-package)            | Explain why a package is installed                                                   |
| [`lpm rebuild`](/docs/packages/rebuild)                      | Run or rerun dependency lifecycle scripts                                            |
| [`lpm approve-scripts`](/docs/packages/approve-scripts)      | Approve packages blocked by the default-deny script policy                           |
| [`lpm trust`](/docs/packages/trust)                          | Manage `trustedDependencies` in `package.json`                                       |
| [`lpm patch`](/docs/packages/patch)                          | Generate a local patch (`patch-package` style)                                       |
| [`lpm patch-commit`](/docs/packages/patch)                   | Finalize a patch staging directory                                                   |
| [`lpm patch-remove`](/docs/packages/patch)                   | Remove registered local patches                                                      |
| [`lpm sbom`](/docs/packages/sbom)                            | Export a CycloneDX or SPDX Software Bill of Materials                                |
| [`lpm licenses`](/docs/packages/licenses)                    | Inventory dependency licenses and enforce compliance policy                          |
| [`lpm migrate`](/docs/packages/migrate)                      | Migrate from npm / yarn / pnpm / bun                                                 |

## Scripts and execution [#scripts-and-execution]

| Command                                     | What it does                                                 |
| ------------------------------------------- | ------------------------------------------------------------ |
| [`lpm run`](/docs/dev/run)                  | Run scripts (parallel `-p`, cached, `--watch`)               |
| [`lpm dev`](/docs/dev/dev)                  | Zero-config dev server with HTTPS, tunnel, and orchestration |
| [`lpm <file>` / `lpm exec`](/docs/dev/exec) | Run JS/TS files directly, or run project-local binaries      |
| [`lpm dlx`](/docs/dev/dlx) (`lpx`)          | Run a package without installing it                          |
| [`lpm test`](/docs/dev/test)                | Auto-detect and run the project's test runner                |
| [`lpm bench`](/docs/dev/bench)              | Auto-detect and run the project's benchmark runner           |

## Built-in tools and managed engines [#built-in-tools-and-managed-engines]

| Command                                   | Backed by                                             |
| ----------------------------------------- | ----------------------------------------------------- |
| [`lpm lint`](/docs/dev/lint)              | Oxlint                                                |
| [`lpm fmt`](/docs/dev/fmt)                | Biome                                                 |
| [`lpm bundle`](/docs/dev/bundle)          | Rolldown (managed plugin)                             |
| [`lpm pack`](/docs/dev/pack)              | Project-local tsdown                                  |
| [`lpm check`](/docs/dev/check)            | TypeScript (`tsc --noEmit`) / `tsgo` (managed engine) |
| [`lpm plugin list`](/docs/dev/plugin)     | Show installed tools                                  |
| [`lpm plugin outdated`](/docs/dev/plugin) | Check managed tool updates                            |
| [`lpm plugin update`](/docs/dev/plugin)   | Update managed tools                                  |

## Runtime and environment [#runtime-and-environment]

| Command                               | What it does                                                                                             |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [`lpm use`](/docs/dev/use)            | Install and pin managed Node.js or Bun versions                                                          |
| [`lpm env`](/docs/dev/env)            | Per-project secrets — set / get / list / push / pull / pair / OIDC, with end-to-end-encrypted cloud sync |
| [`lpm global`](/docs/packages/global) | Manage globally-installed CLIs (`~/.lpm/global/`)                                                        |

## Dev infrastructure [#dev-infrastructure]

| Command                            | What it does                                               |
| ---------------------------------- | ---------------------------------------------------------- |
| [`lpm tunnel`](/docs/infra/tunnel) | Expose localhost; claim domains; inspect & replay webhooks |
| [`lpm cert`](/docs/infra/cert)     | Local HTTPS certificate management                         |
| [`lpm proxy`](/docs/infra/proxy)   | Inspect and run the local-domain proxy daemon              |
| [`lpm hosts`](/docs/infra/hosts)   | Remove LPM CLI-managed local-domain hosts-file entries     |
| [`lpm ports`](/docs/infra/ports)   | Dev-service port management                                |

## Workspaces and deployment [#workspaces-and-deployment]

| Command                                   | What it does                                                   |
| ----------------------------------------- | -------------------------------------------------------------- |
| [`lpm filter`](/docs/packages/workspaces) | Preview the workspace set a `--filter` expression selects      |
| [`lpm catalog`](/docs/packages/catalog)   | Inspect catalog declarations and resolved lockfile snapshots   |
| [`lpm deploy`](/docs/packages/workspaces) | Materialize a member's deploy closure for `COPY --from=pruned` |

## Project health [#project-health]

| Command                                        | What it does                                                             |
| ---------------------------------------------- | ------------------------------------------------------------------------ |
| [`lpm doctor`](/docs/infra/doctor)             | Project + environment health check (`--fix` to auto-repair)              |
| [`lpm health`](/docs/infra/doctor)             | Check registry health                                                    |
| [`lpm policy`](/docs/infra/policy)             | List, diagnose, and test local install policy extensions                 |
| [`lpm store verify`](/docs/infra/store)        | Verify package store integrity                                           |
| [`lpm cache`](/docs/packages/cache)            | Manage ephemeral caches and prune the global package store               |
| [`lpm self-update`](/docs/infra/self-update)   | Update LPM CLI to the latest version                                     |
| [`lpm completions`](/docs/dev/completions)     | Emit a shell completion script (bash, zsh, fish, powershell, elvish)     |
| [`lpm schema <kind>`](/docs/reference/schemas) | Emit the JSON Schema for a config file (`lpm.json` or `lpm.config.json`) |

## Debug and inspection [#debug-and-inspection]

| Command                                   | What it does                                             |
| ----------------------------------------- | -------------------------------------------------------- |
| [`lpm download`](/docs/packages/download) | Download and extract a tarball (no install side-effects) |
| [`lpm resolve`](/docs/packages/resolve)   | Print a resolved dependency tree without installing      |

## Auth and config [#auth-and-config]

| Command                                               | What it does                                         |
| ----------------------------------------------------- | ---------------------------------------------------- |
| [`lpm login`](/docs/infra/login) (`l`)                | Authenticate against a registry                      |
| [`lpm logout`](/docs/infra/login) (`lo`)              | Clear stored auth state                              |
| [`lpm whoami`](/docs/infra/login)                     | Show the current user                                |
| [`lpm token-rotate`](/docs/infra/token-rotate)        | Rotate your auth token                               |
| [`lpm setup ci npmrc`](/docs/infra/setup)             | Generate `.npmrc` for CI/CD                          |
| [`lpm setup ci <platform>`](/docs/infra/setup)        | Print OIDC workflow snippets                         |
| [`lpm setup local`](/docs/infra/setup)                | Read-only `.npmrc` token for local development       |
| [`lpm ci`](/docs/packages/install)                    | Frozen lockfile install for CI                       |
| [`lpm init`](/docs/packages/init)                     | Create a new package manifest                        |
| [`lpm config`](/docs/infra/config)                    | CLI configuration                                    |
| [`lpm security`](/docs/infra/security)                | Temporary approvals: unlock / lock / status / repair |
| [`lpm pool`](/docs/packages/pool)                     | Pool revenue stats                                   |
| [`lpm skills`](/docs/packages/skills)                 | Package-published and standalone AI agent skills     |
| [`lpm swift-registry`](/docs/packages/swift-registry) | Configure SPM integration (SE-0292)                  |
| [`lpm mcp setup`](/docs/reference/mcp-servers)        | Configure MCP server for AI editors                  |

## Global flags [#global-flags]

These work on every command:

| Flag                    | Effect                                                                                                           |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `-V`, `-v`, `--version` | Print the LPM CLI version and exit                                                                               |
| `--token <TOKEN>`       | Use a specific auth token instead of the stored one (env: `LPM_TOKEN`)                                           |
| `--registry <URL>`      | Override the registry URL for this command (env: `LPM_REGISTRY_URL`)                                             |
| `--json`                | Emit JSON output (for CI / scripting)                                                                            |
| `--verbose`             | Debug logging                                                                                                    |
| `--insecure`            | Allow an explicitly configured plain-HTTP non-localhost registry; HTTPS redirects still cannot downgrade to HTTP |
