iOfficeAI/OfficeCLI
OfficeCLI is the first and best Office suite purpose-built for AI agents to read, edit, and automate Word, Excel, and PowerPoint files. Free, open-source, single binary, no Office installation required.
OfficeCLI – AI‑friendly command‑line Office suite
What it is – A single, self‑contained binary that lets programs (especially LLM‑powered agents) create, read, edit and render Microsoft Word, Excel and PowerPoint files without needing Microsoft Office installed. All operations are exposed as simple CLI commands (officecli create …, officecli add …, officecli view …).
Why it matters for AI – The tool ships its own high‑fidelity HTML/PNG rendering engine, so an LLM can see exactly how a document looks, detect layout problems, and fix them in a tight “render → look → fix” loop. It also provides structured JSON output for any element, making it easy for an agent to reason about the document’s content.
Key capabilities
- Create new .docx, .xlsx, .pptx files from scratch.
- Read text, styles, formulas, charts, tables, images, comments, etc., either as plain text or as detailed JSON.
- Modify any element (text, fonts, colors, layout, formulas, charts, shapes, videos, 3D models, etc.) via
add,set,removecommands. - Render documents to HTML, PNG screenshots, or a live‑refreshing local web preview (
officecli watch). - Template merge – replace
{{key}}placeholders in a template with JSON data. - Batch dump / replay – serialize a whole document or a subtree to JSON for reproducible editing pipelines.
- Excel engine – evaluates 350+ built‑in functions, dynamic arrays, pivot tables, slicers, conditional formatting, etc., without opening Excel.
- Full format support – Word, Excel and PowerPoint are all read‑modify‑create capable (✓ in the table).
Typical workflow
# Install the binary (one‑liner)
curl -fsSL https://officecli.ai/SKILL.md # for AI agents
# or curl …/install.sh | bash # for humans
# Create a presentation and add a slide
officecli create deck.pptx
officecli add deck.pptx / --type slide --prop title="Q4 Report"
# Add a textbox shape on that slide
officecli add deck.pptx '/slide[1]' \
--type shape --prop text="Revenue grew 25%" \
--prop x=2cm --prop y=5cm --prop font=Arial --prop size=24
# Preview instantly in the browser
officecli watch deck.pptx # http://localhost:26315 updates on every command
The same pattern works for Word (officecli add report.docx …) and Excel (officecli add budget.xlsx '/Sheet1' --type cell …).
Installation – Distributed as a single binary with the .NET runtime embedded. Install via:
- One‑line script (
curl … | bashor PowerShell equivalent) - Homebrew, Scoop, npm (
brew install officecli,scoop install officecli,npm i -g @officecli/officecli) - Direct download of the appropriate platform binary.
Who benefits
- AI agents (Claude Code, Cursor, GitHub Copilot, etc.) can generate or edit Office files with a single command, and get visual feedback.
- Developers can automate report generation, bulk style updates, CI/CD document pipelines, or run head‑less Office automation inside containers.
- Teams can clone templates, populate them with data, and validate documents automatically.
Where to learn more – Official site: https://officecli.ai, Discord community, and extensive wiki pages for each format (e.g., Word paragraph, Excel pivot, PowerPoint animation).
Related
- Dispatch
- Dispatch
- Project
- Project
- Project