# OfficeCLI

> A single-binary CLI that lets AI agents read, edit and render Word, Excel and PowerPoint files without Office installed

- Category: AI Productivity & Writing / Office Documents & Spreadsheets
- Language: C#
- Licence: Apache-2.0
- Repository: https://github.com/iOfficeAI/OfficeCLI
- Website: https://officecli.ai
- Canonical page: https://ai-tldr.dev/tools/officecli/
- Updated: 2026-07-08

## In short

OfficeCLI is an open-source command-line Office suite designed to be driven by AI agents. It creates, reads and edits Word, Excel and PowerPoint files as a single binary, with no Microsoft Office installation and no extra dependencies. It sits in the Office Documents & Spreadsheets category of the AI Productivity & Writing tools and is open-source, written in C# and licensed Apache-2.0.

## Overview

OfficeCLI is an open-source command-line Office suite designed to be driven by AI agents. It creates, reads and edits Word, Excel and PowerPoint files as a single binary, with no Microsoft Office installation and no extra dependencies. Document elements are addressed by path expressions — `/slide[1]/shape[1]` — and every command can return structured JSON, so an agent can inspect a document's real structure instead of guessing at a binary format.

Its second half is a rendering engine. OfficeCLI renders .docx, .xlsx and .pptx to HTML or PNG, which closes the render-look-fix loop: the agent writes a change, renders the result, and sees whether the slide actually looks right. A `watch` command serves a live preview on localhost that refreshes on every `add`, `set` or `remove`, so the browser doubles as a feedback loop for a human sitting next to the agent.

The project ships an installer that puts the binary on your PATH and installs an OfficeCLI skill into every AI coding agent it detects — Claude Code, Cursor, Windsurf, GitHub Copilot and others — plus a built-in MCP server so MCP clients can call it directly. There is also a companion desktop app, AionUi, that drives OfficeCLI under the hood for people who would rather describe a document than type commands.

## What it does

- Create, read and edit .docx, .xlsx and .pptx as a single binary — no Office install, no runtime dependencies, cross-platform
- Built-in HTML and PNG rendering so an agent can look at what it just produced and correct it
- Path-addressed elements (`/slide[1]/shape[1]`) with `--json` output, giving agents a structured view of a document
- A `watch` command that serves a live browser preview refreshing on every edit
- A built-in MCP server, plus an installer that drops an OfficeCLI skill into detected coding agents such as Claude Code, Cursor, Windsurf and GitHub Copilot
- 350+ Excel formulas supported, so spreadsheets stay computable rather than static
- A GUI companion, AionUi, that drives OfficeCLI from natural language

## Getting started

Install the binary with the install script, Homebrew or npm, then create a document and start the live preview. If you are wiring it into an agent, `officecli install` also installs the skill into every coding agent it detects.

1. Install

   Use the install script on macOS or Linux, the PowerShell script on Windows, or a package manager.

```bash
curl -fsSL https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.sh | bash
# or: brew install officecli
# or: npm install -g @officecli/officecli
```

2. Register it with your agents

   This copies the binary to your PATH and installs the OfficeCLI skill into every AI coding agent it detects.

```bash
officecli install
```

3. Create a deck and watch it live

   `watch` opens a live preview at http://localhost:26315 that refreshes on every edit you make from another terminal.

```bash
officecli create deck.pptx
officecli watch deck.pptx
```

4. Add content by path

   Elements are addressed with path expressions and configured with --prop flags.

```bash
officecli add deck.pptx / --type slide --prop title="Q4 Report" --prop background=1A1A2E
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
```

5. Inspect, render and save

   `view outline` prints the structure, `view html` renders a preview, `get --json` returns a structured element, and `close` flushes the session to disk.

```bash
officecli view deck.pptx outline
officecli view deck.pptx html
officecli get deck.pptx '/slide[1]/shape[1]' --json
officecli close deck.pptx
```

## When to use it

- Let a coding agent produce a real .pptx or .xlsx deliverable instead of markdown a human has to retype
- Read and extract structure from Office documents on a server that has no Microsoft Office installed
- Give an agent a visual feedback loop by rendering a document to PNG and letting a vision model check the layout
- Automate repetitive report or deck generation in CI, where a single static binary is easier to ship than a Python document stack

## Version history

- 2026-07-08 v1.0.132: Ships a built-in MCP server, HTML rendering, and support for 350+ Excel formulas in the single-binary Office suite for AI agents.
