LPM CLI

JSON Schemas

Use editor schemas or export configuration schemas from your installed CLI version.

lpm schema exports JSON Schemas for LPM CLI configuration files. Use a published schema for editor completion, or export a local copy that matches your installed CLI version.

lpm schema <KIND> [-o <PATH>]
KindConfiguration
lpm.jsonProject runtimes, tasks, services, environments, and publish targets.
lpm.config.jsonSource-package prompts, file selection, and dependency rules for lpm add.

The command emits a schema. It does not check a project file against that schema.

Quickstart

Add the schema URL to your project file:

lpm.json
{
  "$schema": "https://cli.lpm.dev/schemas/lpm.json",
  "runtime": { "node": "22" }
}

An editor with JSON Schema support can suggest fields and report invalid values. The $schema field does not change command behavior or require an online schema download during normal CLI use.

Published URLs

Use the canonical cli.lpm.dev URLs in new files. For a source package:

lpm.config.json
{
  "$schema": "https://cli.lpm.dev/schemas/lpm.config.json",
  "files": [{ "src": "src/**" }]
}

Emit Locally

Print a schema without prompts:

lpm schema lpm.json
lpm schema lpm.config.json

Save local schemas for a pinned CLI version:

mkdir -p schemas
lpm schema lpm.json -o schemas/lpm.json
lpm schema lpm.config.json --out schemas/lpm.config.json

--out replaces an existing file. It does not create parent directories. The output is formatted JSON. Interactive terminal output can use color. File and redirected output remain plain JSON.

To use a local schema, set a relative path in the configuration file:

lpm.json
{ "$schema": "./schemas/lpm.json" }

Schema checks and command checks

Schemas check field shapes and supported constraints. Commands also check project state and relationships that a schema cannot express. For example, development services must not form dependency cycles or claim conflicting hostnames.

The public schema can describe a newer CLI version than the one installed locally. If editor results differ from your CLI, export its schema and use that copy. lpm doctor also reports unknown project configuration fields. See each configuration reference for runtime checks and recovery steps.

Flags

FlagEffect
-o <PATH>, --out <PATH>Write the schema to this file instead of stdout.

See global flags. An unsupported kind fails with the list of accepted kinds. A missing parent directory or an unwritable output path causes a write error.

See also