OfficeCLI
OfficeCLI is the world's first and the best Office suite designed for AI agents.It is a free, open-source command-line tool for AI agents to read, edit, and automate Word, Excel, and PowerPoint files. Single binary, no Office installation required.
Install / Use
/learn @iOfficeAI/OfficeCLIREADME
OfficeCLI
OfficeCLI is the world's first and the best Office suite designed for AI agents.
Give any AI agent full control over Word, Excel, and PowerPoint -- in one line of code.
Open-source. Single binary. No Office installation. No dependencies. Works everywhere.
English | 中文
<p align="center"> <img src="assets/ppt-process.gif" alt="OfficeCLI creating a PowerPoint presentation on AionUi" width="100%"> </p> <p align="center"><em>PPT creation process using OfficeCLI on <a href="https://github.com/iOfficeAI/AionUi">AionUi</a></em></p> <p align="center"><strong>PowerPoint Presentations</strong></p> <table> <tr> <td width="33%"><img src="assets/designwhatmovesyou.gif" alt="OfficeCLI design presentation (PowerPoint)"></td> <td width="33%"><img src="assets/horizon.gif" alt="OfficeCLI business presentation (PowerPoint)"></td> <td width="33%"><img src="assets/efforless.gif" alt="OfficeCLI tech presentation (PowerPoint)"></td> </tr> <tr> <td width="33%"><img src="assets/blackhole.gif" alt="OfficeCLI space presentation (PowerPoint)"></td> <td width="33%"><img src="assets/first-ppt-aionui.gif" alt="OfficeCLI gaming presentation (PowerPoint)"></td> <td width="33%"><img src="assets/shiba.gif" alt="OfficeCLI creative presentation (PowerPoint)"></td> </tr> </table> <p align="center">—</p> <p align="center"><strong>Word Documents</strong></p> <table> <tr> <td width="33%"><img src="assets/showcase/word1.gif" alt="OfficeCLI academic paper (Word)"></td> <td width="33%"><img src="assets/showcase/word2.gif" alt="OfficeCLI project proposal (Word)"></td> <td width="33%"><img src="assets/showcase/word3.gif" alt="OfficeCLI annual report (Word)"></td> </tr> </table> <p align="center">—</p> <p align="center"><strong>Excel Spreadsheets</strong></p> <table> <tr> <td width="33%"><img src="assets/showcase/excel1.gif" alt="OfficeCLI budget tracker (Excel)"></td> <td width="33%"><img src="assets/showcase/excel2.gif" alt="OfficeCLI gradebook (Excel)"></td> <td width="33%"><img src="assets/showcase/excel3.gif" alt="OfficeCLI sales dashboard (Excel)"></td> </tr> </table> <p align="center"><em>All documents above were created entirely by AI agents using OfficeCLI — no templates, no manual editing.</em></p>For AI Agents — Get Started in One Line
Paste this into your AI agent's chat — it will read the skill file and install everything automatically:
curl -fsSL https://officecli.ai/SKILL.md
That's it. The skill file teaches the agent how to install the binary and use all commands.
Technical details: OfficeCLI ships with a SKILL.md (239 lines, ~8K tokens) that covers command syntax, architecture, and common pitfalls. After installation, your agent can immediately create, read, and modify any Office document.
Quick Start
From zero to a finished presentation in seconds:
# Create a new PowerPoint
officecli create deck.pptx
# Add a slide with a title and background color
officecli add deck.pptx / --type slide --prop title="Q4 Report" --prop background=1A1A2E
# Add a text shape to the 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 --prop color=FFFFFF
# View the outline of the presentation
officecli view deck.pptx outline
Output:
Slide 1: Q4 Report
Shape 1 [TextBox]: Revenue grew 25%
# Get structured JSON for any element
officecli get deck.pptx /slide[1]/shape[1] --json
{
"tag": "shape",
"path": "/slide[1]/shape[1]",
"attributes": {
"name": "TextBox 1",
"text": "Revenue grew 25%",
"x": "720000",
"y": "1800000"
}
}
Why OfficeCLI?
What used to take 50 lines of Python and 3 separate libraries:
from pptx import Presentation
from pptx.util import Inches, Pt
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[0])
title = slide.shapes.title
title.text = "Q4 Report"
# ... 45 more lines ...
prs.save('deck.pptx')
Now takes one command:
officecli add deck.pptx / --type slide --prop title="Q4 Report"
What OfficeCLI can do:
- Create documents from scratch -- blank or with content
- Read text, structure, styles, formulas -- in plain text or structured JSON
- Analyze formatting issues, style inconsistencies, and structural problems
- Modify any element -- text, fonts, colors, layout, formulas, charts, images
- Reorganize content -- add, remove, move, copy elements across documents
| Format | Read | Modify | Create | |--------|------|--------|--------| | Word (.docx) | ✅ | ✅ | ✅ | | Excel (.xlsx) | ✅ | ✅ | ✅ | | PowerPoint (.pptx) | ✅ | ✅ | ✅ |
Word — paragraphs, runs, tables, styles, headers/footers, images, equations, comments, lists, watermarks, bookmarks, TOC
Excel — cells, formulas, sheets, styles, conditional formatting, charts, pivot tables, named ranges, data validation, $Sheet:A1 cell addressing
PowerPoint — slides, shapes, text boxes, images, tables, charts, animations, morph transitions, 3D models (.glb), slide zoom, equations, themes, connectors, video/audio
Use Cases
For Developers:
- Automate report generation from databases or APIs
- Batch-process documents (bulk find/replace, style updates)
- Build document pipelines in CI/CD environments (generate docs from test results)
- Headless Office automation in Docker/containerized environments
For AI Agents:
- Generate presentations from user prompts (see examples above)
- Extract structured data from documents to JSON
- Validate and check document quality before delivery
For Teams:
- Clone document templates and populate with data
- Automated document validation in CI/CD pipelines
Installation
Ships as a single self-contained binary. The .NET runtime is embedded -- nothing to install, no runtime to manage.
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 download manually from GitHub Releases:
| Platform | Binary |
|----------|--------|
| macOS Apple Silicon | officecli-mac-arm64 |
| macOS Intel | officecli-mac-x64 |
| Linux x64 | officecli-linux-x64 |
| Linux ARM64 | officecli-linux-arm64 |
| Windows x64 | officecli-win-x64.exe |
| Windows ARM64 | officecli-win-arm64.exe |
Verify installation: officecli --version
Or self-install from a downloaded binary:
officecli install
Updates are checked automatically in the background. Disable with officecli config autoUpdate false or skip per-invocation with OFFICECLI_SKIP_UPDATE=1. Configuration lives under ~/.officecli/config.json.
Key Features
Live Preview
watch starts a local HTTP server with a live HTML preview of your PowerPoint file. Every modification auto-refreshes in the browser — ideal for iterative design with AI agents.
officecli watch deck.pptx
# Opens http://localhost:18080 — refreshes on every set/add/remove
Renders shapes, charts, equations, 3D models (Three.js), morph transitions, zoom navigation, and all shape effects.
Resident Mode & Batch
For multi-step workflows, resident mode keeps the document in memory. Batch mode runs multiple operations in one open/save cycle.
# Resident mode — near-zero latency via named pipes
officecli open report.docx
officecli set report.docx /body/p[1]/r[1] --prop bold=true
officecli set report.docx /body/p[2]/r[1] --prop color=FF0000
officecli close report.docx
# Batch mode — atomic multi-command execution
echo '[{"command":"set","path":"/slide[1]/shape[1]","props":{"text":"Hello"}},
{"command":"set","path":"/slide[1]/shape[2]","props":{"fill":"FF0000"}}]' \
| officecli batch deck.pptx --stop-on-error
Three-Layer Architecture
Start simple, go deep only when needed.
| Layer | Purpose | Commands |
|-------|---------|----------|
| L1: Read | Semantic views of content | view (text, annotated, outline, stats, issues, html) |
| L2: DOM | Structured element operations | get, query, set, add, remove, move |
| L3: Raw XML | Direct XPath access — universal fallback | raw, raw-set, add-part, validate |
# L1 — high-level views
officecli view report.docx annotated
officecli view budget.xlsx text --cols A,B,C --max-lines 50
# L2 — element-level operations
officecli query report.docx "run:contains(TODO)"
officecli add budget.xlsx / --type sheet --prop name="Q2 Report"
officecli move report.docx /body/p[5] --to /body --index 1
# L3 — raw XML when L2 isn't enough
officecli raw deck.pptx /slide[1]
officecli raw-set report.docx document \
--xpath "//w:p[1]" --action append \
--xml '<w:r><w:t>Injected text</w:t></w:r>'
AI Integration
MCP Server
Built-in MCP server — register with one command:
officecli mcp claude # Claude Code
officecli mcp cursor # Cursor
officecli mcp vscode # VS Code / Copilot
officecli mcp lmstudio # LM Studio
officecli mcp list # Check registration status
Exposes all document operations as tools over JSON-RPC — no shell access needed.
Direct CLI Integration
Get OfficeCLI working with your AI agent in two steps:
- Install the binary -- one command (see Installation)
- Done. OfficeCLI automatically detects your AI tools (Claude Code, GitHub Copilot, Codex) by checking known config directories and installs its skill file. Your agent can immediately create, read, and modify any Office document.
Related Skills
diffs
339.1kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
1.8kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
ui-ux-pro-max-skill
53.2kAn AI SKILL that provide design intelligence for building professional UI/UX multiple platforms
