CLI tool
iOfficeAI/OfficeCLI avatar
iOfficeAI/OfficeCLI

OfficeCLI: Command-Line Office Suite for AI Agents

OfficeCLI is the Office suite purpose-built for AI agents to read, edit, and automate Word, Excel, and PowerPoint files. Free, open-source, single binary, no Office installation required.

31,381 stars2,141 forksC#Apache-2.0

At a glance

What is it?
OfficeCLI is an open-source single binary that gives AI agents and developers full read, write, and create access to Word, Excel, and PowerPoint files without requiring Microsoft Office. It renders documents to HTML or PNG, supports a structured JSON path model for targeting any element, and auto-installs its skill into Claude Code, Cursor, and other coding agents.
Who is it for?
OfficeCLI is the right tool when an AI agent needs to create, read, or modify Office files programmatically without a Microsoft Office installation. The `officecli install` command auto-wires the skill into Claude Code, Cursor, Windsurf, and GitHub Copilot, so an agent in any of those environments can immediately start creating documents.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What OfficeCLI Solves and Who It Is For

Creating or editing a PowerPoint file in Python requires the python-pptx library, which itself requires understanding its object model. Adding a slide, a shape, and text involves multiple lines of code for each step. OfficeCLI compresses that into single commands that any AI agent can emit without library knowledge.

The README frames this as the core value: what used to take 50 lines of Python and 3 separate libraries now takes one command. The primary audience is AI agent developers who need their agents to produce Office documents as output, and developers who want to automate Office file generation in CI or scripting workflows.

The tool works on all three major Office formats: Word (.docx), Excel (.xlsx), and PowerPoint (.pptx). The license is Apache-2.0. The project is open source under the iOfficeAI GitHub organization.

The JSON Path Model and HTML Rendering

OfficeCLI uses a path model to address elements within a document. Paths use XPath-like syntax with tag names and positional indices, for example `/slide[1]/shape[1]` to address the first shape on the first slide.

The `view` command returns structured JSON for any element at a given path. For example, viewing a shape returns:

json
{
  "tag": "shape",
  "path": "/slide[1]/shape[1]",
  "attributes": {
    "name": "TextBox 1",
    "text": "Revenue grew 25%",
    "x": "720000",
    "y": "1800000"
  }
}

This JSON output is what allows an AI agent to read a document's structure before modifying it. The agent inspects the current state, identifies the element it wants to change, and then issues a `set` or `remove` command at that path.

The HTML rendering engine reproduces documents visually. `officecli view deck.pptx html` opens a rendered preview in the browser without a server. This closes the render-then-inspect loop: the agent can generate a document, render it to HTML, observe the result, and fix issues, all in the same terminal session.

Installing OfficeCLI and Running First Commands

On macOS and Linux, install with:

bash
curl -fsSL https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.sh | bash

On Windows with PowerShell:

bash
irm https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.ps1 | iex

Or install via npm: `npm install -g @officecli/officecli`, or via Homebrew: `brew install officecli`.

After installation, run `officecli install` to copy the binary to your PATH and install the skill into detected coding agents.

Create a blank presentation and start a live preview:

bash
officecli create deck.pptx
officecli watch deck.pptx

The `watch` command opens `http://localhost:26315` in your browser. Then, in another terminal, add a slide:

bash
officecli add deck.pptx / --type slide --prop title="Q4 Report" --prop background=1A1A2E

The browser updates instantly. Add a shape to that slide:

bash
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 to confirm the structure:

bash
officecli view deck.pptx outline

Supported Formats and Feature Coverage

All three formats support Read, Modify, and Create operations. The README documents capabilities per format:

Word (.docx) supports i18n and RTL layouts through per-script font slots and BCP-47 language tags. The `lang.latin`, `lang.ea`, and `lang.cs` attributes set language per run, and `direction=rtl` cascades through paragraphs, runs, sections, tables, styles, headers, footers, and document defaults. Creating with `--locale ar-SA` auto-enables RTL. Word also supports equations (LaTeX input), diagrams (Mermaid input rendered to native editable shapes or PNG), comments, footnotes, textboxes with rotation, gradient, and shadow, and virtual column operations on tables.

Excel (.xlsx) supports formulas, named ranges, charts, pivot tables, and conditional formatting. PowerPoint (.pptx) supports slide transitions, animations (entrance, emphasis, exit), morph transitions, speaker notes, and master slide control.

For AI agents, OfficeCLI provides a SKILL.md file at `https://officecli.ai/SKILL.md`. Pasting the curl command for that file into an agent's chat teaches the agent how to install and use all commands automatically.

Limitations: Closed Binary Core and Legacy Format Support

OfficeCLI ships as a binary; the build script and SDK sources are in the repository, but the core document engine is a compiled C# binary. The `src/` directory and `sdk/` directory are in the repository, but the rendering and editing logic is not fully readable as open source in the way the README implies for all components.

The README documents the `.docx`, `.xlsx`, and `.pptx` formats exclusively. Older binary formats (`.doc`, `.xls`, `.ppt`) are not mentioned. Teams working with legacy Office files generated before Office 2007 will need to convert them to the Open XML format first.

The live preview server runs on port 26315 (`http://localhost:26315`). If that port is occupied by another service, the watch command will conflict. The README does not document a port override flag.

The VS Code, Cursor, Windsurf, and GitHub Copilot skill installation runs `officecli install`, which detects agents automatically. It is not documented which versions of those agents are supported, and skill compatibility may change as those agents update.

OfficeCLI versus python-pptx

python-pptx is the most widely used open-source Python library for PowerPoint file manipulation. It is lower-level than OfficeCLI: it exposes the Open XML structure directly and gives full control over every presentation element, but requires writing code for every operation. Creating a slide with a title and a text box takes roughly 10 to 15 lines of python-pptx code.

OfficeCLI's advantage is the single-command model that is legible to an LLM without library knowledge, the built-in rendering for visual inspection, and the skill-based auto-installation into coding agents. python-pptx's advantage is full programmatic control, no binary dependency, and a large community of examples and documentation. Teams building traditional Python scripts that process many files in a pipeline will generally find python-pptx more practical; teams building AI agents that create documents on demand will find OfficeCLI more convenient.

Maintenance and Release Cadence

OfficeCLI is under active development. The last push to the repository was on 2026-09-27, and three releases have occurred in the last two weeks: v1.0.150 on 2026-09-14, v1.0.151 on 2026-09-16, and v1.0.152 on 2026-09-22. The high patch version numbers indicate frequent incremental updates.

The Apache-2.0 license is permissive for commercial use. The CONTRIBUTING.md, SECURITY.md, and THIRD-PARTY-NOTICES.txt are present in the repository. The `plugins/`, `sdk/`, and `skills/` directories indicate that the architecture supports extension.

The community channel is the Discord server linked in the README (discord.gg/2QAwJn7Egx). The AionUi desktop application, maintained by the same organization, provides a natural-language GUI over OfficeCLI for non-developer users.

Editorial conclusion

OfficeCLI is the right tool when an AI agent needs to create, read, or modify Office files programmatically without a Microsoft Office installation. The `officecli install` command auto-wires the skill into Claude Code, Cursor, Windsurf, and GitHub Copilot, so an agent in any of those environments can immediately start creating documents. The built-in HTML rendering engine closes the render-then-inspect loop that most Office automation libraries leave open. Teams who need to process legacy `.doc` or `.xls` formats (not the `x` variants) should check the documentation at officecli.ai before adopting, since the README documents only the open XML formats (.docx, .xlsx, .pptx). v1.0.152 was released on 2026-09-22.

Frequently asked questions

What is OfficeCLI?

OfficeCLI is an open-source single-binary command-line tool for reading, editing, and creating Word, Excel, and PowerPoint files without a Microsoft Office installation. It is designed for AI agents and includes auto-installation into Claude Code, Cursor, Windsurf, and GitHub Copilot.

How do you use OfficeCLI?

Install with `curl -fsSL https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.sh | bash` on macOS and Linux, or with `npm install -g @officecli/officecli`. Then run `officecli install` to wire it into detected coding agents. Use `officecli create`, `add`, `set`, `remove`, and `view` commands to work with documents.

What does OfficeCLI do?

OfficeCLI reads and writes .docx, .xlsx, and .pptx files through a command-line interface. It renders documents to HTML or PNG for visual inspection, exposes a JSON path model for targeting any element, and supports formulas, charts, animations, RTL text, and other advanced formatting.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/iofficeai-officecli.svg)](https://hysenlabs.com/projects/iofficeai-officecli)
Community notes

Community notes