local-packages-manager
v1.0.5
Published
(LPM) A versatile package manager for local development. Supports all file types.
Maintainers
Readme
local-packages-manager (lpm)
A versatile CLI package manager for local development. Designed to manage and distribute local packages across multiple projects using a parent-child architecture.
NPM Install Global
Install
npm i -g local-packages-managerUse
lpmPackage System
lpm is based on two core concepts:
- Package Definition (parent): defines what a package exposes
- Package Install (child): defines where and how that package is installed
Package Definition (Parent)
Defines a reusable local package.
File: lpm-definition.json
{
"name": "project-1",
"version": "1.0.0",
"sourcePath": "lib",
"include": [
"/**"
],
"exclude": []
}Fields
- name: Unique package name
- version: Package version
- sourcePath: Root folder where files are taken from
- include: Glob patterns to include files
- exclude: Glob patterns to exclude files
Behavior
- Acts as the source of truth
- Defines what files will be shared
- Can be consumed by multiple projects
Package Install (Child)
Defines where and how a package is installed.
File: lpm-install.json
[
{
"name": "project-1",
"version": "1.0.0",
"installPath": "src/lib"
}
]Fields
- name: Name of the parent package
- version: Version to install
- installPath: Destination inside the project
Behavior
- References a parent package
- Defines where files will be copied or linked
- Can install multiple packages
Relationship (Parent → Child)
lpm-definition.json → lpm-install.json
(source) (target)Flow
- A package is defined using
lpm-definition.json - Another project declares it in
lpm-install.json - Running:
lpm installlpm will:
- Locate the parent package
- Read its definition
- Copy or link files from
sourcePath - Respect
include/exclude - Install them into
installPath
Example Workflow
Step 1: Create a shared package
cd common-lib
lpm initDefine:
{
"name": "common-lib",
"version": "1.0.0",
"sourcePath": "src",
"include": ["/**"],
"exclude": ["**/*.test.js"]
}Step 2: Consume it in another project
[
{
"name": "common-lib",
"version": "1.0.0",
"installPath": "src/shared"
}
]Step 3: Install
lpm installResult:
common-lib/src → project/src/sharedCommand Summary
| Command | Alias | Description | | --------- | ----- | ---------------------------------- | | init | — | Create lpm-install.json | | new | — | Create lpm-definition.json | | package | p | Pack a package into local registry | | unpackage | up | Remove package from local registry | | install | i | Install packages into workspace | | uninstall | ui | Remove installed package | | help | -h | Show help |
Notes
packagemust be executed beforeinstallPackages are resolved from the local registry (
~/.lpm)Version must match between:
lpm-definition.jsonlpm-install.json
Example

The image shows a typical lpm workflow with three projects:
project-1 and project-2 act as parent packages
- Each defines its exports using
lpm-definition.json - They expose files from their
libfolders (e.g.hello.js,math.js)
- Each defines its exports using
project-3 acts as the consumer (child)
- Uses
lpm-install.jsonto declare dependencies - Installs both packages into
src/lib
- Uses
Benefits of This Model
- Clear separation between definition and usage
- No need to publish to npm
- Works across multiple repositories
- Full control over file distribution
- Ideal for microservices and shared codebases
