CLI Commands
Authentication
lpm login
Sign in to LPM. Opens your browser for OAuth authentication. Token is stored in your OS keychain.
lpm login
lpm logout
Remove stored credentials from your keychain.
lpm logout
lpm whoami
Show the currently authenticated user and their plan.
lpm whoami
Publishing
lpm publish
Publish the current directory as a package to the LPM registry. Auto-detects the ecosystem from project files (package.json for JavaScript, Package.swift for Swift, .xcframework for pre-built binaries). Creates a tarball, verifies SHA-512 integrity, and uploads. Runs ecosystem-specific quality checks and includes the score with the published version.
lpm publish
# Run quality checks without publishing
lpm publish --check
# Require a minimum quality score
lpm publish --min-score 80
Installing
lpm install
Install a package from the LPM registry. For JavaScript packages, installs to node_modules (wraps npm). For Swift packages, edits your Package.swift to add the dependency via SE-0292 registry, then runs swift package resolve. Agent Skills are fetched by default — use --no-skills to skip.
# JavaScript — installs to node_modules
lpm install @lpm.dev/acme.design-system
lpm install --no-skills @lpm.dev/acme.design-system
# Swift — edits Package.swift, resolves via SPM
lpm install @lpm.dev/acme.swift-logger
lpm add
Download and extract source files into your project (shadcn-style). Use this when you want to own and modify the code directly. See Source Code Delivery.
lpm add @lpm.dev/acme.login-form
lpm add @lpm.dev/acme.login-form --preset react
# Skip skills
lpm add @lpm.dev/acme.login-form --no-skills
Discovery
lpm search
Search for packages on the LPM marketplace. Uses hybrid keyword + semantic search - you can search by intent (e.g., "validate user input") not just exact keywords. Results are ranked using AI-generated metadata and embeddings.
lpm search "form builder"
lpm search "validate user input"
lpm info
Show details about a specific package (versions, description, dependencies).
lpm info @lpm.dev/acme.design-system
lpm check-name
Check if a package name is available on the registry.
lpm check-name acme.new-package
# JSON output
lpm check-name acme.new-package --json
lpm quality
Show the server-side quality report for a published package. Displays the score, tier, and breakdown of all checks (28 for JavaScript, 25 for Swift, 21 for XCFramework).
lpm quality @lpm.dev/acme.design-system
# JSON output
lpm quality @lpm.dev/acme.design-system --json
Swift
lpm swift-registry
Configure Swift Package Manager to use LPM as a package registry. Sets the lpmdev scope, authenticates with your LPM token, and installs the package signing certificate.
lpm swift-registry
Run from any directory with a Package.swift. This is a one-time setup — SPM remembers the configuration across projects.
See Swift Package Registry for the full guide.
Setup & Diagnostics
lpm npmrc
Generate a 30-day read-only token and write it to .npmrc for local development. Makes npm install work with LPM packages. Automatically adds .npmrc to .gitignore.
lpm npmrc
# Custom expiry
lpm npmrc --days 7
lpm npmrc --days 90
Run again to refresh when the token expires.
lpm setup
Configure the @lpm.dev scope in your .npmrc file. Writes a ${LPM_TOKEN} placeholder for CI/CD environments where the token is set as an environment variable.
# CI/CD with static secret
lpm setup
# CI/CD with OIDC — no secrets needed (GitHub Actions, GitLab CI)
lpm setup --oidc
With --oidc, the command exchanges the CI provider's identity token for a 30-minute read-only LPM token. Falls back to the placeholder if OIDC is unavailable. See CI/CD Integration for workflow examples.
lpm doctor
Run a health check on your LPM setup. Verifies Node.js version, npm config, auth status, and registry connectivity.
lpm doctor
Maintenance
lpm audit
Scan your dependencies for known vulnerabilities.
lpm audit
lpm outdated
Check which of your LPM dependencies have newer versions available.
lpm outdated
Utilities
lpm config
View or update CLI configuration settings.
lpm config
lpm cache
Manage the local package cache.
lpm cache
lpm open
Open a package's page on lpm.dev in your browser.
lpm open @lpm.dev/acme.design-system
lpm run
Run a script defined in the package's package.json.
lpm run build
Token Management
lpm token rotate
Rotate your current authentication token. Revokes the existing token and issues a new one.
lpm token rotate
Pool Revenue
lpm pool stats
Show your Pool earnings estimate for the current billing period. Displays per-package breakdown with install counts, weighted downloads, share percentage, and estimated earnings.
lpm pool stats
# JSON output
lpm pool stats --json
Marketplace
lpm marketplace compare
Find comparable packages by name or category. Useful for pricing research and competitive analysis.
lpm marketplace compare "form builder"
lpm marketplace compare ui --category ui-components
lpm marketplace compare auth --limit 5
# JSON output
lpm marketplace compare "form builder" --json
lpm marketplace earnings
Show your Marketplace revenue summary including total sales, gross revenue, platform fees, and net revenue.
lpm marketplace earnings
# JSON output
lpm marketplace earnings --json