Getting Started
This guide covers everything you need to go from zero to a published package.
Prerequisites
For JavaScript packages:
- Node.js 18 or later (only for projects that run JS toolchains — LPM itself is a single binary)
For Swift packages:
- macOS with Xcode 15 or later (includes Swift 5.9+)
The LPM CLI is distributed as a Rust binary — see Installation for npm, Homebrew, curl, and cargo paths.
Quick Start
JavaScript
# Install the CLI
npm install -g @lpm-registry/cli
# Sign in
lpm login
# Configure .npmrc for the @lpm.dev scope
lpm setup-npmrc
# Publish your package
lpm publish
Swift
# Install the CLI
npm install -g @lpm-registry/cli
# Sign in
lpm login
# Publish from a directory containing Package.swift
lpm publish
The CLI auto-detects your ecosystem from the project files (package.json for JavaScript, Package.swift for Swift).
Using Swift Packages
To use LPM packages as SPM dependencies in your Swift projects, run:
lpm swift-registry
This configures SPM to resolve lpmdev.* packages from LPM's registry. See Swift Package Registry for the full guide.
You can also add LPM's Swift Package Collection to Xcode to browse packages directly from the IDE.
After publishing, your package is live at lpm.dev/your-username.package-name.
Verify Your Setup
lpm doctor
This checks your Node.js version, npm configuration, authentication status, and registry connectivity.
Next Steps
- Installation - Detailed setup instructions
- Authentication - Tokens, keychain storage, and CI/CD
- Publishing - Package format and publish flow