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>]| Kind | Configuration |
|---|---|
lpm.json | Project runtimes, tasks, services, environments, and publish targets. |
lpm.config.json | Source-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:
{
"$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
| File | Canonical URL | Compatibility alias |
|---|---|---|
lpm.json | cli.lpm.dev/schemas/lpm.json | lpm.dev/schemas/lpm.json |
lpm.config.json | cli.lpm.dev/schemas/lpm.config.json | lpm.dev/schemas/lpm.config.json |
Use the canonical cli.lpm.dev URLs in new files.
For a source package:
{
"$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.jsonSave 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:
{ "$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
| Flag | Effect |
|---|---|
-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.