Lem CLI command reference.
Every public LemCLI command has one canonical page. Lem prints machine-readable JSON to stdout, sends diagnostics and usage to stderr, and exits nonzero on a refusal.
Run LemCLI#
The installed executable is lem-cli. From a source checkout, the equivalent prefix is swift run LemCLI. The command pages below use the installed form so each invocation can be copied without a package checkout.
Manuscript selectors accept an exact UUID or a case-insensitive title substring; their registry is normally ~/.lem/papers.json and LEM_PAPERS_PATH overrides it. Library selectors are the source's own identifier — an arXiv id or arxiv.org URL, a DOI or doi.org URL, or the URL of the page that published the work; their independent manifest is normally ~/.lem/literature.json and LEM_LITERATURE_PATH overrides it.
lem-cli <command> [args]Read commands#
- papers — list every paper's metadata.
- paper — show one paper selected by id or title.
- library and library list — list the global external-literature library; library show reads one paper by its own source identifier.
- provenance — print the latest saved provenance report.
- figures — list figures found in one paper's sources.
- roadmap — read the staged plan to a finished paper, and mirror it onto Oko's work item with --push.
Write and workflow commands#
- import — discover papers and merge them into the registry.
- refresh-context — refresh or reuse per-paper context.
- audit — run the provenance audit.
- citation — add or check citations.
- citation-harvest — discover, fetch, bind, plan, read, and verify a literature corpus.
- library add — read one published source, arXiv, DOI or page, into the library; library analyze saves supplied Markdown on its library record.
- figure — generate an SVG intermediate or editable TikZ.
- humanize — rewrite text locally with Skryba.