Packages
LPM.dev Registry hosts JavaScript and Swift packages under the @lpm.dev/ scope. New packages are private; authors can later make a package available through Pool or Marketplace.
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 Registry name:
@lpm.dev/<owner>.<package>
The owner is your username or an organization where you can publish. The package page uses the same dotted owner-and-package identity:
https://lpm.dev/<owner>.<package>
JavaScript packages
A JavaScript package uses the standard npm-compatible package.json format:
{
"name": "@lpm.dev/acme.my-utils",
"version": "1.0.0",
"main": "index.js",
"files": ["src/", "index.js"]
}
Standard npm packing rules determine which files are uploaded. Consumers install the package with LPM CLI or another compatible package manager configured for the @lpm.dev scope:
lpm install @lpm.dev/acme.my-utils
Swift packages
Swift publishing requires both files:
package.jsonsupplies the LPM.dev Registry name and version.Package.swiftdefines the Swift products, targets, platforms, and dependencies.
{
"name": "@lpm.dev/acme.networking",
"version": "1.0.0"
}
When Package.swift exists at the project root, LPM CLI detects Swift automatically and 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
See Swift Package Registry for package identity, authentication, signing, and Xcode project behavior.
Swift Package Collections
LPM.dev Registry provides Swift Package Collection endpoints for approved public Swift packages in Pool and Marketplace. Private packages are not included.
| 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, and select Add.
Delivery models
The package contents determine how consumers add a version:
| Delivery model | Command | Result |
|---|---|---|
| Dependency package | lpm install | Managed as a JavaScript or Swift dependency |
| Source package | lpm add | Selected files are copied into the consumer's project |
This delivery model is separate from the JavaScript or Swift ecosystem and from the package's distribution mode. See Package Types for the distinction.
Distribution modes
Every package starts private. The author can keep it private or make it public through one of two reviewed distribution modes:
| Mode | Who can install | Revenue |
|---|---|---|
| Private | Owner or organization members | Not applicable |
| Pool | Pool subscribers | Share of the subscription fund |
| Marketplace | Customers with a license | Direct sales, minus the platform fee |
Changing a private package to Pool or Marketplace requires selecting a version for activation. The package remains private until that version passes publication review. Once public distribution is activated, the choice is permanent.
Later versions enter review independently. Entitled consumers continue receiving the latest approved version while a newer version is waiting for approval.
See Distribution Modes for activation, review, access, and payment details.
See also
- Package Types — Compare dependency installation with source delivery.
- Publishing Packages — Prepare and publish JavaScript or Swift packages.
- Swift Package Registry — Use SPM with LPM.dev Registry.
- Source Code Delivery — Copy package-owned source into a project with
lpm add. - Source Configuration — Configure files, prompts, and dependencies for source delivery.
- Versioning — Publish immutable semantic versions.
- LPM CLI publish reference — Review every publish target, flag, and output format.