# JSON Schemas (/docs/reference/schemas)



```bash
lpm schema lpm.json
lpm schema lpm.config.json
lpm schema lpm.json -o schema.json
```

LPM ships JSON Schemas for the two JSON config files it owns: `lpm.json` and `lpm.config.json`. Use the published URLs for editor autocomplete, or use `lpm schema` to emit the schema from the exact CLI version installed on your machine.

## Published URLs [#published-urls]

| File              | Canonical schema URL                          | Compatibility alias                       |
| ----------------- | --------------------------------------------- | ----------------------------------------- |
| `lpm.json`        | `https://cli.lpm.dev/schemas/lpm.json`        | `https://lpm.dev/schemas/lpm.json`        |
| `lpm.config.json` | `https://cli.lpm.dev/schemas/lpm.config.json` | `https://lpm.dev/schemas/lpm.config.json` |

Use the canonical `cli.lpm.dev` URL in new files:

```json title="lpm.json"
{
  "$schema": "https://cli.lpm.dev/schemas/lpm.json"
}
```

```json title="lpm.config.json"
{
  "$schema": "https://cli.lpm.dev/schemas/lpm.config.json"
}
```

## Emit Locally [#emit-locally]

```bash
lpm schema lpm.json
lpm schema lpm.config.json
```

Without `-o`, LPM pretty-prints the schema to stdout. With `-o` / `--out`, it writes the pretty-printed JSON to that path:

```bash
lpm schema lpm.json -o lpm.schema.json
lpm schema lpm.config.json --out lpm-config.schema.json
```

`lpm schema` accepts only these two kinds:

| Kind              | Source of truth                                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| `lpm.json`        | Auto-derived from the typed Rust struct that parses `lpm.json`.                                   |
| `lpm.config.json` | Hand-authored alongside the `lpm add` consumer code, with drift tests against the published copy. |

Unknown kinds fail with a message listing the supported values.

## Flags [#flags]

| Flag                        | Effect                                        |
| --------------------------- | --------------------------------------------- |
| `-o <PATH>`, `--out <PATH>` | Write the schema to a file instead of stdout. |

Plus the [global flags](/docs/commands#global-flags).

## See also [#see-also]

* [`lpm.json`](/docs/reference/lpm-json) - runtime, tasks, services, tunnel, env, and publish config
* [`lpm.config.json`](/docs/reference/lpm-config-json) - source-package installer config
* [`lpm add`](/docs/packages/add) - consumer flow for packages that ship `lpm.config.json`
* [`lpm dev`](/docs/dev/dev) - common `lpm.json` consumer
