Packages
LPM.dev Registry hosts JavaScript and Swift packages under the @lpm.dev/ scope. New packages are private. Later, the owner can make a package public with Free, Pool, or Marketplace distribution.
Supported ecosystems
| Ecosystem | Project files | How LPM CLI detects it |
|---|---|---|
| JavaScript | package.json | Default publishing ecosystem |
| Swift | package.json and Package.swift | A root Package.swift selects Swift automatically |
Both ecosystems use the same LPM.dev Registry name:
@lpm.dev/<owner>.<package>
The owner is your username or an organization where you can publish. The package page uses the same owner and package name, joined by a dot:
https://lpm.dev/<owner>.<package>
JavaScript packages
A JavaScript package uses the standard npm package.json format:
{
"name": "@lpm.dev/acme.my-utils",
"version": "1.0.0",
"main": "index.js",
"files": ["src/", "index.js"]
}
LPM CLI uses the standard npm packing rules to select the files that it uploads. Consumers can install the package with LPM CLI, or with another npm-compatible package manager that is set up for the @lpm.dev scope:
lpm install @lpm.dev/acme.my-utils
Swift packages
A Swift package must have both files:
package.jsongives the LPM.dev Registry name and the version.Package.swiftdefines the Swift products, targets, platforms, and dependencies.
{
"name": "@lpm.dev/acme.networking",
"version": "1.0.0"
}
If Package.swift is at the project root, LPM CLI selects Swift automatically. It reads the manifest with swift package dump-package. Authors do not need to declare Swift in lpm.config.json.
Consumers install Swift libraries with lpm install. LPM CLI configures Swift Package Manager (SPM), updates the project, and resolves the dependency:
lpm install @lpm.dev/acme.networking
Swift Package Registry explains package identity, authentication, signing, and Xcode project behavior.
Swift Package Collections
LPM.dev Registry has Swift Package Collection endpoints. They list the Swift packages with Free, Pool, or Marketplace distribution that have an approved release. They do not list private or archived packages.
| Collection | URL |
|---|---|
| All public Swift packages | https://lpm.dev/api/collections/swift |
| By owner | https://lpm.dev/api/collections/swift/{owner} |
| By category | https://lpm.dev/api/collections/swift/category/{category} |
In Xcode, choose File > Add Package Collection. Paste a collection URL. Select Add.
Delivery models
The package contents determine how consumers add a version:
| Delivery model | Command | Result |
|---|---|---|
| Dependency package | lpm install | LPM CLI manages it as a JavaScript or Swift dependency |
| Source package | lpm add | LPM CLI copies selected files into the consumer's project |
The delivery model does not depend on the JavaScript or Swift ecosystem, or on the distribution mode of the package. Package types explains the difference.
Distribution modes
Every package starts private. The owner can keep it private, or make it public with one of three distribution modes:
| Mode | Who can install | Revenue |
|---|---|---|
| Private | Owner or organization members | None |
| Free | Anyone, without an account | None |
| Pool | Pool subscribers | Share of the subscription fund |
| Marketplace | Customers with a license | Direct sales, minus the platform fee |
Free, Pool, and Marketplace packages are public packages. Everyone can see their package pages, even without an account.
If you choose Free, Pool, or Marketplace for a private package, LPM.dev Registry sends its latest version to publication review. The package stays private until the review approves a release. The choice is permanent from the moment you make it, even if the review rejects that release.
Each later version also goes through publication review. While a newer version waits for review, consumers keep receiving the highest approved version.
Distribution modes explains activation, review, access, and payment.
See also
- Package types compares dependency installation with source delivery.
- Publishing packages explains how to prepare and publish JavaScript or Swift packages.
- Swift Package Registry explains how to use SPM with LPM.dev Registry.
- Source code delivery explains how
lpm addcopies package source into a project. - Source configuration explains how to configure files, prompts, and dependencies for source delivery.
- Versioning explains immutable semantic versions.
- LPM CLI publish reference lists every publish target, flag, and output format.