OfficeCLI
This is a note from my public notes. View the canonical version: OfficeCLI.
OfficeCLI is an open-source command-line tool that lets AI agents create, read and edit Word, Excel and PowerPoint files (.docx, .xlsx, .pptx). You don't need Microsoft Office: it ships as one self-contained binary for macOS, Linux and Windows, and every command can answer in JSON. It comes from iOfficeAI, the team behind AionUI, which uses it under the hood for its document features.
Why it exists
Office files are ZIP archives full of verbose Office Open XML (OOXML). Agents are bad at that format. Making half a sentence bold means splitting it into several XML "runs", and a numbered list needs coordinated entries in two separate files. So agents usually fall back to writing Python against python-docx, openpyxl or python-pptx. That burns tokens, and it leaves them blind: they can read the structure, but they can't tell whether a title overflows its box or two shapes overlap.
OfficeCLI goes after both problems. It wraps the document model in short commands that address elements by stable paths (/slide[1]/shape[2], 1-based, no XML namespaces), and it renders documents to HTML or PNG so a multimodal agent can LOOK at what it produced and fix it. The README calls this the render → look → fix loop.
How it works
- Three layers. L1 gives read-only views (
viewin text, outline, annotated, stats, issues, html, svg or screenshot mode). L2 is element operations (get,query,set,add,remove,move,swap) with CSS-like selectors such asrow[Salary>5000 and Region=EMEA]. L3 is raw XML through XPath (raw,raw-set,add-part,validate) for whatever L2 doesn't cover. Agents start cheap and go deeper only when needed. - Errors an agent can act on. Failures return a code (
not_found,invalid_value,unsupported_property…) plus a suggestion, such as the valid slide range or the closest property name to a typo. Exit code 2 means "ran with caveats", so scripts have to read thesuccessfield rather than trust the exit code alone. - Resident and batch modes.
openkeeps a document in memory behind a named pipe so successive commands are near-instant;close(orsave) flushes it to disk.batchapplies a JSON list of operations and rolls the whole batch back if one item fails, unless you pass--best-effort. - Engines inside the binary. An HTML renderer (charts, equations via KaTeX, 3D
.glbmodels via Three.js, morph transitions), a formula engine that evaluates 350+ Excel functions on write (dynamic arrays, XLOOKUP, financial and statistical functions), and native pivot tables that Excel opens already populated. - Template merge and round-trip dump.
mergefills{{key}}placeholders from JSON across the three formats.dumpturns an existing document, or any subtree of it, into replayable batch JSON. The idea: the agent designs a layout once (expensive), then plain code fills it N times (cheap, deterministic). - Live preview.
watchstarts a local server onhttp://localhost:26315that refreshes on everyadd,setorremove. - Agent integration. A built-in Model Context Protocol (MCP) server registers with one command (
officecli mcp claude,cursor,vscode,lmstudio), and aSKILL.mdteaches agents the command set. The repo also ships specialized skills (pitch deck, financial model, data dashboard, academic paper, Word forms, morph slides). - Plugins. Sidecar processes add formats without bloating the binary: reading legacy
.doc, handling.hwpx/.hwp, exporting to PDF. - SDKs.
officecli-sdk(Python) and@officecli/sdk(Node.js) talk to a resident process over a pipe instead of spawning one per call.
Under the hood it's C# on .NET 10, built on Microsoft's DocumentFormat.OpenXml SDK and compiled into a native binary with the runtime embedded.
Install and usage
# 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: brew install officecli / scoop install officecli / npm install -g @officecli/officecli
officecli create deck.pptx
officecli add deck.pptx / --type slide --prop title="Q4 Report"
officecli view deck.pptx outline
officecli get deck.pptx '/slide[1]' --json
officecli view deck.pptx screenshot -o deck.png
officecli close deck.pptx
officecli help pptx set shape lists every settable property, so an agent can look things up instead of guessing.
A few things to know before installing it:
- It writes into your agent setup. On first install, the script copies its skill file into every agent config folder it finds:
~/.claude,~/.copilot,~/.agents,~/.cursor,~/.windsurf,~/.openclaw,~/.hermesand a few others. Convenient, but it happens without asking. Readinstall.shfirst if you curate your skills. - It updates itself. Background update checks are on by default; turn them off with
officecli config autoUpdate falseorOFFICECLI_SKIP_UPDATE=1. In a pipeline, I'd pin a version. - "No dependencies" has an asterisk. HTML rendering is built in, but PNG screenshots go through a browser found on the machine (Playwright, Chrome/Edge/Chromium, or Firefox).
Supported formats
| Format | Read | Modify | Create |
|---|---|---|---|
Word (.docx) |
yes | yes | yes |
Excel (.xlsx) |
yes | yes | yes |
PowerPoint (.pptx) |
yes | yes | yes |
Coverage per format is deep: tracked changes, fields, content controls, footnotes and RTL scripts in Word; pivots, slicers, sparklines and conditional formatting in Excel; animations, morph transitions, 3D models and SmartArt round-trip in PowerPoint. Mermaid diagrams become native editable shapes (flowcharts, sequence diagrams) or images, and equations accept LaTeX. CSV/TSV imports into sheets. Through plugins: .doc input (migrated to a sibling .docx), .hwpx/.hwp, and PDF export.
License, maturity and people
- License: Apache 2.0. The NOTICE file reads "Created and maintained by goworm" (copyright 2026, OfficeCLI.AI).
- Age and pace: the repository and v1.0.0 both date from 2026-03-15. By 2026-09-30 it had shipped 147 releases (latest v1.0.153). Commits land daily, and the recent log is almost entirely
fix(...)commits: a young codebase being hardened in public. - Activity (2026-10-03): 106 open issues and pull requests on GitHub. A Hacker News submission on 2026-07-06 reached 215 points and 61 comments.
- Who's behind it: the iOfficeAI GitHub organization, whose display name is "AionUi" and whose website is aionui.com. It hosts AionUI, OfficeCLI and smaller Aion projects (aionrs, AionCore, AionHub), all Apache 2.0. The organization publishes no company name or location on GitHub. officecli.ai simply redirects to the repo, and the README exists in English, Chinese, Japanese and Korean.
- Bus factor: goworm, whose GitHub bio says "The Builder Of OfficeCLI", has authored 6,056 commits. The next contributor has 55. For all the attention, this is essentially a one-person codebase.
How people received it
The Hacker News thread was positive overall, with useful pushback. One commenter (rcarmo) pointed out the absence of ECMA-376 conformance tests and noted that he had started similar projects a year earlier; another commenter replied that his tools don't render documents. One commenter argued that generating the file is the easy part: in enterprise settings, the real cost lies in validating citations, numbers and formatting. Another asked whether it actually beats letting Claude Code write Python directly, on prompt adherence, visual quality and tokens; no one in the thread answered with numbers.
Vespper, a YC-backed competitor, published the only benchmark I found, in its own launch post (2026-09-28). By their count, a Word-editing task takes OfficeCLI 13 tool calls (median), Anthropic's DOCX skill 10, and their own MCP 3. That's a vendor measuring itself, so treat it as a hint.
Alternatives
- python-docx, openpyxl, python-pptx: the libraries OfficeCLI positions itself against. Python only, no rendering.
- LibreOffice headless: full office suite, scriptable through UNO, heavy to install.
- Anthropic's pre-built
docx,xlsx,pptxandpdfskills: available to Claude agents that load skills (see Claude Managed Agents Tools). - Claude in Excel: Claude inside Excel itself, for people who live in the spreadsheet rather than the terminal.
- Docx-CLI (kklimuk/docx-cli): Word only, aimed at halving agents' time and tokens.
- Vespper Docx MCP: commercial, Word only; exposes three tools (read, search, edit) over an HTML projection of the document and reconciles edits with a fine-tuned model.
- rcarmo's python-office-mcp-server and go-ooxml: MCP server and Go library that focus on ECMA-376 compliance.
- ooxml-cli (odcpw): a similar CLI that also targets Excel macros.
- SmallDocs: skips Office formats entirely with its own agent-friendly document format; Elastic License 2.0, so it's source-available rather than open source.
- Conversion instead of editing: Pandoc or MarkItDown (lossy, mostly one-way), or Marp/HTML-to-PDF for slides when nobody needs an editable
.pptx.
My take: if the deliverable must be a native Office file that a colleague opens and edits, OfficeCLI is the broadest open-source option in this list, and the built-in rendering is the part that really matters. The risks are the ones listed above: a single maintainer, a firehose of releases, and an installer that edits your agent configs.
References
- GitHub repository: https://github.com/iOfficeAI/OfficeCLI
- README, NOTICE, SECURITY.md,
install.sh,src/officecli/officecli.csprojandsrc/officecli/Core/HtmlScreenshot.cs(main branch, 2026-10-02) - Wiki: https://github.com/iOfficeAI/OfficeCLI/wiki (Home, command-plugins, agent-guide)
- Releases: https://github.com/iOfficeAI/OfficeCLI/releases
- GitHub REST API (repository stats, releases, contributors, iOfficeAI organization), queried 2026-10-03
- Maintainer profile: https://github.com/goworm
- iOfficeAI organization: https://github.com/iOfficeAI
- AionUi: https://github.com/iOfficeAI/AionUi
- Hacker News discussion (2026-07-06): https://news.ycombinator.com/item?id=48807225
- Launch HN: Vespper Docx MCP (2026-09-28): https://news.ycombinator.com/item?id=49881505
- Show HN: Docx-CLI (2026-07-07): https://news.ycombinator.com/item?id=48821500
- Docx-CLI: https://github.com/kklimuk/docx-cli
- python-office-mcp-server: https://github.com/rcarmo/python-office-mcp-server
- go-ooxml: https://github.com/rcarmo/go-ooxml
- ooxml-cli: https://github.com/odcpw/ooxml-cli
- SmallDocs: https://github.com/espressoplease/smalldocs
Related
- AionUI
- Claude Code
- Claude Code Skills
- AI Agent Skills
- AI Agents
- Model Context Protocol (MCP)
- Command Line Interface (CLI)
- Microsoft
- Claude in Excel
- Claude Managed Agents Tools
- Pandoc
- MarkItDown
- Marp
- Google Workspace CLI
- Open Source
About Sébastien
Ready to get to the next level?
Found this valuable? Share it with someone who needs it.