lmoffice
lmoffice is a self-contained .NET 8 NativeAOT lmcode host that creates and inspects Word, Excel, and PowerPoint Open XML documents. It embeds dedicated docx, xlsx, and pptx schemas and validates generated packages with OpenXmlValidator without requiring Microsoft Office.
Quick reference
npm install -g @lmctl-ai/lmctl
lmoffice --version
lmoffice docx --lmcode-schema --json
lmoffice inspect report.docx --markdown
| Route or context | Key methods or flags | Purpose |
|---|---|---|
| lmoffice docx | docx.create(path), heading, paragraph, table, markdown, html_doc, save | Author Word (.docx) documents from typed builder calls, Markdown, or html-doc@1 XHTML/CSS. |
| lmoffice xlsx | xlsx.create(path), sheet, set, formula, number_format, bar_chart, sheet_from_csv, save | Author Excel (.xlsx) workbooks with 1-based cells, formulas, conditional formatting, and charts. |
| lmoffice pptx | pptx.create(path), slide, title_slide, text, bullet, table, bar_chart, markdown, save | Author 16:9 PowerPoint (.pptx) presentations on a 1280x720 canvas or from slide-separated Markdown. |
| lmoffice inspect | lmoffice inspect FILE [--markdown] | Validate .docx, .xlsx, or .pptx packages with OpenXmlValidator and return JSON counts or Markdown. |
body = """# Weekly brief
- **Shipped:** the pilot workflow
- **Next:** customer feedback
{{sign: Avery Chen}}
""";
p = _lmcode_ cli="lmoffice docx" install="github:lmctl-ai/lmoffice@v0.1.33";
docx.create("brief.docx").markdown(${body}).save();
end _lmcode_
r = run_lmcode(p);
assert(r.ok, json_stringify(r));
Documentation pages
- Skill — authoring rules, CLI commands, inputs and outputs, safety rules, worked examples, and verification steps.
- Guide — subcommand architecture, Markdown and html-doc@1 workflows, coordinate conventions, and the standard lmcode_std_v3 library.
- Reference — complete CLI flags, Docx/Xlsx/Pptx schema types and methods, standard library catalog, and exit codes.