Own the code you install
lpm add copies a package's source files into your project. Customize them, extend them, and learn from them.
From node_modules to your project
The LPM CLI copies a package's components, styles, and utilities into your project as source files you can edit.
lpm add brings the shadcn/ui model to any package with a tarball on the LPM.dev Registry, npm, or a private registry in your .npmrc. It works in JavaScript and Swift projects.
Tailored to your stack
Authors define the options, such as a framework, an icon set, or a provider. The CLI asks for your choices before it writes any file to your project.
Configure once, install anywhere
Authors declare the prompts in lpm.config.json. You pick your styling, provider, or features when you run lpm add.
A condition on a file rule lets the CLI copy only the variants that match your answers. The author's dependency list works the same way, and the CLI adds the matching packages to package.json and installs them.
Why source code?
Code in your project is code you can read, change, and review.
Full ownership, zero lock-in
The code lives in your project's files. Read it, fork it, or fix it, and review every change in your version control.
Full customization
Change colors, fonts, and logic directly in the copied files to fit your brand and architecture.
No hidden dependencies
Every line of the delivered code is in your project, where you can read it. The CLI prints each dependency it adds to package.json. For a package without lpm.config.json, it lists the external imports the code uses, so you can check that your project has them.
Design system distribution
Ship a whole design system as source. Buyers theme it to their own brand by editing the files in their project.
Learn from code
Publish reference implementations, starter kits, and tutorials where the source is the product. Readers add the package and read the code in their own editor.
For authors
One lpm.config.json at the root of your package tells the CLI what to ask, which files to copy, and which dependencies to add.
Condition-based logic
Make a file rule conditional, and the CLI skips the file when the buyer's answers don't match. One package can ship a variant for each provider, styling framework, or feature.
Native source delivery
Each variant is a plain source file, so you can test and type-check it like the rest of your code. When a buyer runs lpm add, the CLI rewrites your import alias and relative imports to fit their project.
Conditional dependencies
List the packages each answer needs, from npm, the LPM.dev Registry, or a private registry. The CLI adds the ones that match the buyer's answers to package.json and installs them.
Frequently asked questions
How are updates handled?
Delivered files don't update on their own. To take a new version, run lpm add for the package again. The CLI updates the files you haven't edited. For each file you changed, it shows a diff summary and asks whether to keep your version or overwrite it, and with --yes it keeps yours. Add --dry-run to preview the changes first.
Can I customize the delivered code?
Yes. The files are part of your project, so you can change colors, refactor components, or adapt the code to your architecture. LPM records what it delivered in lpm-sources.json, so lpm remove keeps every file you edited.
What are presets?
Presets are options an author declares in lpm.config.json, such as a style, a color theme, or a provider. When you run lpm add, the CLI asks for each one, copies the files that match your answers, and installs the matching dependencies. To skip the prompts, put the answers in the package spec, such as ?theme=dark, or pass --yes to use the author's defaults.
How is lpm add different from lpm install?
lpm install resolves a package and links it into node_modules as a dependency. lpm add copies the package's files into your project. Use lpm install for utilities you use as they are, and lpm add for the components and logic you want to customize and audit.
Can I sell source packages?
Yes. Put a source package on the Marketplace to sell UI components, templates, design systems, or starter kits. Buyers need a current license to download it, and lpm add copies its files into their project.
Start shipping source code
Publish UI components, design systems, and starter kits as source, with presets for each buyer's setup. lpm add puts the code in the buyer's own project.