LPM-cli

lpm init

Create a new package with the LPM name format.

lpm init [-y]

Generates a minimal package.json for a new LPM package, plus a .gitattributes entry that marks lpm.lockb as binary (so git doesn't try to text-merge it later).

In an interactive terminal, prompts for owner, package name, version, and description. With -y, skips every prompt and uses defaults. Refuses to overwrite an existing package.json.

The interactive owner prompt is pre-filled from your lpm whoami profile username (with a 3-second timeout to keep lpm init from blocking on the network). If you're offline or not logged in, the placeholder is the literal string username — change it before publishing.

Successful human output is a short status transcript:

✓ Wrote package.json
✓ Added lpm.lockb binary to .gitattributes
✓ Done · initialized @lpm.dev/<owner>.<name>

Examples

mkdir my-pkg && cd my-pkg
lpm init             # interactive walk
lpm init -y          # accept all defaults

What it writes

package.json
{
  "name": "@lpm.dev/<owner>.<name>",
  "version": "1.0.0",
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "type": "module",
  "license": "MIT",
  "files": ["dist"]
}

Plus an entry in .gitattributes:

.gitattributes
lpm.lockb binary

Package name format

LPM publishes under @lpm.dev/<owner>.<name>. init constructs the full name from your owner and name answers. You can publish under any owner you've claimed on lpm.dev — see lpm publish for the upload flow.

If you're going to publish to npm or another registry instead, you can rename the name field after init finishes (or pass --npm to lpm publish and configure publish.npm.name in lpm.json).

Defaults under -y

FieldValue
ownerYour lpm whoami profile username, or the literal "username" if not logged in / offline
name"package" (literal — not the directory name)
version1.0.0
description(empty)

Rename the manifest's name field if those placeholder defaults aren't what you want.

Flags

FlagEffect
-y, --yesSkip prompts, use defaults

Plus the global flags. --json emits a brief envelope confirming what was created: {success, name, version, path}.

See also