OfficeCLI
Office suite purpose-built for AI agents to read, edit, and create Word, Excel, and PowerPoint.
Overview
Office suite purpose-built for AI agents to read, edit, and create Word, Excel, and PowerPoint.
Setup
Run with npx:
npm install -g @officecli/officecliConfiguration
Single binary, no Office installation required; built-in MCP serverDocumentation
OfficeCLI
Overview
OfficeCLI is the first and best Office suite purpose-built for AI agents β an open-source, single-binary solution for reading, editing, and creating Word, Excel, and PowerPoint documents. At 23,700 GitHub stars, OfficeCLI enables AI agents to work natively with Office documents without requiring any Microsoft Office installation.
Written in C#, OfficeCLI ships as a single binary with a built-in HTML/PNG rendering engine so agents can "see" documents β closing the renderβlookβfix loop that has historically made Office document automation with AI unreliable. It includes a built-in MCP server for seamless agent integration and auto-detects Claude Code, GitHub Copilot, and Codex on install.
Features
- Built-in rendering: HTML/PNG output engine β AI agents can visually inspect documents
- Formula engine: 350+ Excel functions auto-evaluated (dynamic arrays, financial, statistical)
- Template merge: Replace
{{key}}placeholders with JSON data across documents - Round-trip dump: Serialize any document subtree to replayable batch JSON
- Resident mode: Keep documents in memory for near-zero latency operations
- Built-in MCP server: Native Model Context Protocol integration
- Auto AI detection: Detects and installs skills for Claude Code, Copilot, Codex
- Single binary: No Office installation required
- Deterministic JSON output: Path-based element addressing
- Self-healing errors: Structured error suggestions for recovery
Supported Formats
| Format | Read | Modify | Create |
|---|---|---|---|
| Word (.docx) | β i18n, RTL, equations, diagrams, comments | β | β |
| Excel (.xlsx) | β formulas, pivot tables, charts | β conditional formatting | β |
| PowerPoint (.pptx) | β animations, transitions, 3D models | β morph | β |
Installation
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
Package managers:
# Homebrew (macOS)
brew install officecli
# npm
npm install -g @officecli/officecli
# Scoop (Windows)
scoop install officecli
Quick Start
# Create a PowerPoint deck
officecli create deck.pptx
# Add a slide
officecli add deck.pptx / --type slide --prop title="Q4 Report"
# View as HTML (agent can "see" it)
officecli view deck.pptx html
# View as PNG
officecli view deck.pptx png
# Close the document
officecli close deck.pptx
Read and analyze an existing file:
officecli open report.docx
officecli view report.docx html
officecli get report.docx /body/paragraph[0]
officecli open data.xlsx
officecli eval data.xlsx '=SUM(A1:A100)'
officecli formula data.xlsx 'B2=PRICE(A2,0.05,10)'
Template merge:
officecli merge template.docx --data '{"name":"Alice","date":"2026-07-31"}'
# Replaces {{name}} and {{date}} in the document
Advanced Features
Resident mode (low-latency operations):
officecli open --resident deck.pptx
# Document stays in memory for repeated operations
officecli add deck.pptx / --type slide --prop title="Slide 2"
officecli add deck.pptx / --type slide --prop title="Slide 3"
officecli close deck.pptx
Round-trip dump (for complex transformations):
officecli dump deck.pptx --json
# β Serializable batch JSON for replay on any machine
officecli apply deck.pptx --from batch.json
MCP server configuration:
{
"mcpServers": {
"officecli": {
"command": "officecli",
"args": ["mcp"]
}
}
}
Excel formula engine:
# 350+ built-in functions
officecli formula data.xlsx 'C1=VLOOKUP(A1,prices!A:B,2,0)'
officecli formula data.xlsx 'D1=PRICE(B1,0.05,10,100,100,2)'
Pros
- β Native Office document support without Microsoft Office installed
- β Built-in rendering lets agents "see" documents
- β 350+ Excel functions auto-evaluated
- β Built-in MCP server for easy agent integration
- β Auto-detects and configures for Claude Code, Copilot, Codex
- β Single binary β no dependency on Office suite
- β Apache 2.0 license
Cons
- β C# dependency on non-Windows platforms (mono/runtime)
- β Complex document layouts may not render perfectly
- β Learning curve for path-based element addressing
- β Newer project β fewer community templates than established tools
When to Use
- AI agents that need to read, create, or modify Office documents
- Report automation β generating PPTX decks, DOCX reports from data
- Template-based workflows β filling standardized documents from structured data
- Document analysis β letting AI visually inspect and summarize Office files
- Excel automation β formula computation and pivot table generation
- Cross-platform Office document workflows without Windows/Office dependencies
