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 | keys | .[:5]' requests.lcp.json          # first few symbol IDs
jq '.symbols["requests.api:get"]' requests.lcp.json     # one full entry

The symbols object is a map keyed by stable symbol IDs (module:symbol; class members use #, e.g. requests.sessions:Session#get). Each entry has a kind (function, class, method, module...), a semantics.summary, and optional signatures, stability, effects, and aliases fields.

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