← Command reference · lean-pkg claims · CLI overview
lean-pkg claims check
re-validate cached claims; exit 0/1 (–file: a working-copy file).
Usage
lean-pkg claims check [--file PATH] [--json] [NAME]
Arguments and flags
| Argument or flag | Description |
|---|---|
NAME |
|
--file PATH |
schema-check this claims file (e.g. claims.yaml before you commit it) instead of the registry cache; schema only (no checkout, so declarations are not looked up: claims sync and gate do that); reads no registry; NAME, if given, must be its package |
Details
| Form | What it does | Key flags |
|---|---|---|
claims check [NAME] |
re-validate cached claims (schema, unique ids, acyclic supersession, declarations at the synced commit); exit 0 or 1. --file PATH instead schema-checks a working-copy claims file (schema only: there is no checkout, so declarations are not looked up; validate claims.yaml before the commit you will gate): no registry is read, NAME is optional and, if given, must be the file’s package; PASS/FAIL first, exit 0 or 1, --json {ok, path, claims, errors[], warnings[]}. A claim or manuscript-finding summary of 281 to 300 characters is a warn: line, never a failure: the 300-character refusal is one small edit away (with NAME, each package’s warnings[] and the top-level warnings[] carry them). With NAME, coverage none (no cached claims, no claims.yaml at HEAD) or unsynced (claims.yaml committed, nothing cached) is a failure (exit 1): no coverage is not ok. --json adds coverage, cached_claims, claims_yaml (present, absent, unknown), legacy_claims[] and hint per package. Without NAME, packages with no claims are skipped as before. A NAME that is an existing .yaml, .yml or .json file is a usage error naming --file (exit 2) |
[--file PATH] |
With NAME, when the claims file at the synced commit declares statements_module (#369), the module is checked there too (committed; Prop definitions only, a text check), and --json carries statements_module for the package (A statements module for conditional claims).
Exit codes
Exit 1 is also a negative answer here:
claims check [NAME]: invalid claims, or none synced
JSON output
Top-level keys of --json, as recorded in the golden contract (tests/golden/json-keys.json):
claims-check(exit 1):ok,packages,warnings
Examples
Schema-check a working-copy claims.yaml without the registry.
lean-pkg claims check --file claims.yaml