Skip to content

Quickstart

Generate your first LCP manifest in 60 seconds.

Install

LCP requires Python 3.10 or newer.

pip install lcp
pip install "lcp[ai]"
pip install -e ".[dev]"

The [ai] extra adds OpenAI and Anthropic clients for AI DocGen.

Scan a package

Generate an LCP manifest for any installed Python package:

lcp scan requests -o requests.lcp.json

By default this skips private (underscore-prefixed) symbols and scans submodules recursively. To include private symbols:

lcp scan requests -o requests.lcp.json --include-private

Tip

The default JSON indent is 2 spaces. Use --indent 0 for compact output suitable for diffs.

Inspect the output

The generated file is a JSON document. You can pipe it through jq or open it in any editor.

jq '.symbols[0]' requests.lcp.json

Each entry has a stable id (module:symbol), a kind (function, class, method, module...), a signature, and optional fields for summary, stability, deprecations, and effects.

Validate

Validation runs automatically during scan. To validate an existing file:

lcp validate requests.lcp.json

A successful validation prints OK. Errors point at the offending JSON Pointer path.

Next steps