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
  • npm 9 or later

For Swift packages:

  • macOS with Xcode 15 or later (includes Swift 5.9+)
  • Node.js 18 or later (for the LPM CLI)

Quick Start

JavaScript

# Install the CLI
npm install -g @lpm-registry/cli

# Configure the @lpm.dev scope
lpm setup

# Sign in
lpm login

# 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