Project Overview
OfficeCLI is the first Office suite purpose-built for AI agents, letting any agent read, edit, and automate Word, Excel, and PowerPoint files in one line. GitHub weekly rank #10 (2026.07.14-07.19), currently 22.2k stars, +4,217 weekly. Apache-2.0 license, written in C#, ships as a single static binary with no Microsoft Office install required.
Core Features
- Single binary, zero deps: .NET runtime embedded in the binary - macOS / Linux / Windows, no Office install needed.
- Three formats, full coverage: read / modify / create .docx / .xlsx / .pptx with path-based element addressing (
/slide[1]/shape[2]), so agents skip OOXML namespaces. - Built-in rendering engine: a from-scratch HTML engine renders documents to HTML / PNG, letting AI "see" output and close the render -> look -> fix loop;
watchspins up a local live-preview server. - Formula & pivot engine: 350+ Excel functions auto-evaluated on write (incl. FILTER / SORT / XLOOKUP / financial-bond / statistical-regression), native OOXML pivot tables in one command.
- Template merge + round-trip dump:
mergefills{{key}}placeholders to stamp out N docs from one template;dumpserializes any document to replayable batch JSON so agents learn structure from samples instead of raw XML. - Built-in MCP server:
officecli mcp claude/cursor/vscode/lmstudioregisters in one command, exposing all document ops as JSON-RPC tools. - Three-layer architecture: L1 Read (semantic views) -> L2 DOM (get/set/add/remove) -> L3 Raw XML (XPath fallback), escalating only as needed to save tokens.
Installation & Usage
One-line install:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.ps1 | iex
# Or via package manager
brew install officecli # macOS
scoop install officecli # Windows
npm install -g @officecli/officecli # all platformsAfter install, run officecli install - it auto-detects Claude Code / Cursor / Windsurf / Copilot and drops in the skill file. Hand an agent curl -fsSL https://officecli.ai/SKILL.md and it reads, installs, and uses everything on its own. Quick start:
officecli create deck.pptx
officecli add deck.pptx / --type slide --prop title="Q4 Report"
officecli watch deck.pptx # localhost:26315 live previewUse Cases
- Digital workers / office automation: AI agents generate PPT / Word / Excel from user prompts, no manual layout.
- Batch report generation: pull data from DBs or APIs in CI/CD,
mergetemplates to stamp out reports - agent designs layout once, production code fills N times. - Document pipelines: headless automation in Docker / servers, batch find-replace, style updates, document validation.
- AI agent tooling: wrap Office document capability as MCP tools for Claude Code / Cursor, so agents ship real deliverables.
References
- OfficeCLI GitHub repo: https://github.com/iOfficeAI/OfficeCLI
- OfficeCLI website: https://officecli.ai