CLI Configuration

LPM CLI has built-in routing and authentication for LPM.dev Registry. An .npmrc extends that access to npm, pnpm, yarn, and other npm-compatible tools.

This page covers the connection between local or CI tools and LPM.dev Registry. For general LPM CLI project and user configuration, use the canonical configuration docs.

LPM CLI Session

Sign in for interactive LPM.dev Registry workflows:

lpm login
lpm whoami

LPM CLI stores the session in the operating system keychain when available. Its encrypted fallback is ~/.lpm/.credentials.

The stored session is sufficient for LPM CLI commands such as:

lpm install @lpm.dev/acme.private-utils
lpm publish
lpm env pull
lpm tunnel 3000

You do not need to generate .npmrc merely to make LPM CLI recognize @lpm.dev/*.

See Authentication and the LPM CLI authentication reference.

Local .npmrc Access

Generate project access for npm-compatible tools:

lpm setup local

The command creates a read-only token valid for 30 days by default, writes a scoped .npmrc, and adds the file to .gitignore.

Choose a shorter validity window when appropriate:

lpm setup local --days 7

Run the command again to replace an expiring token.

CI .npmrc Access

Generate the project file used during a CI job:

lpm setup ci npmrc

When no stored credential is available, the generated file uses an ${LPM_TOKEN} placeholder that the npm-compatible client expands at runtime.

LPM CLI reads LPM_TOKEN directly, so a project that installs with lpm ci does not need .npmrc. Keep the generated file job-local when npm, pnpm, or yarn needs it.

See CI/CD Integration and the full lpm setup reference.

Scoped Registry Routing

Generated .npmrc files use scoped routing:

@lpm.dev:registry=https://lpm.dev/api/registry/
//lpm.dev/:_authToken=${LPM_TOKEN}

Only @lpm.dev/* packages use LPM.dev Registry. Unscoped packages continue to use npm or the default registry already configured in .npmrc; other scopes keep their own mappings.

For example, the same project can resolve all three:

{
	"dependencies": {
		"react": "^19.0.0",
		"@my-company/internal-tool": "^2.1.0",
		"@lpm.dev/acme.private-utils": "^1.0.0"
	}
}
PackageRegistry
reactnpm, or the configured default registry
@my-company/internal-toolThe @my-company mapping in .npmrc
@lpm.dev/acme.private-utilsLPM.dev Registry

LPM.dev Registry does not provide an all-npm proxy mode. Package routing remains scoped.

See the LPM CLI registries guide for .npmrc precedence, private registries, TLS, and credential isolation.

Registry Environment Variables

VariablePurpose
LPM_TOKENSupply LPM.dev Registry authentication for the current process, commonly in CI.
LPM_REGISTRY_URLOverride the LPM.dev Registry origin for the current process. Use only a trusted endpoint.

Command-line --token and --registry values take precedence over these variables.

The complete environment-variable reference, including local development and diagnostic settings, belongs to cli.lpm.dev/docs/reference/env-vars.

General LPM CLI Configuration

Registry access is only one part of LPM CLI configuration. The CLI docs are the source of truth for:

Use those pages for exact keys, precedence, accepted values, and command flags.