Open Source
Open Source

OfficeCLI: The Open-Source Office Suite That Lets AI Agents Ship Word/Excel/PPT

GitHub weekly #10 (22.2k stars). An open-source Office suite purpose-built for AI agents-single binary, no Office install, a built-in HTML rendering engine lets AI "see" its output and self-correct, path-based addressing + 350+ function formula engine + MCP server integration.

Published July 26, 20263 min read
<!-- officecli-resource | resource | OfficeCLI Office Suite for AI Agents -->

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; watch spins 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: merge fills {{key}} placeholders to stamp out N docs from one template; dump serializes 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/lmstudio registers 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:

bash
# 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 platforms

After 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:

bash
officecli create deck.pptx
officecli add deck.pptx / --type slide --prop title="Q4 Report"
officecli watch deck.pptx    # localhost:26315 live preview

Use 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, merge templates 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

This article is AI-assisted and human-edited. Last updated: 2026-07-26

FAQ

Does OfficeCLI require Microsoft Office?
No. OfficeCLI ships as a single self-contained binary with the .NET runtime embedded-no Office install or any dependency needed, and it runs on macOS / Linux / Windows.
How do I get Claude Code / Cursor to use OfficeCLI?
After installing the binary, run officecli install to auto-detect your agents and drop in the skill file; or register the built-in MCP server with officecli mcp claude, exposing all document ops as JSON-RPC tools.
How does OfficeCLI differ from python-docx / openpyxl?
python-docx / openpyxl are Python-only libraries with split functionality; OfficeCLI is a CLI + JSON callable from any language, with path-based addressing, a built-in rendering engine, template merge, a 350+ function formula engine, and MCP integration-one command replaces 50 lines of Python.

Related