Favicon of OfficeCLI

OfficeCLI

OfficeCLI is a single-binary CLI for creating, reading, and editing .docx, .xlsx, and .pptx files, built for AI agents and automation.

OfficeCLI website screenshot
OfficeCLI GitHub repository preview

OfficeCLI is a command-line tool for reading, creating, and editing Word, Excel, and PowerPoint files without needing Microsoft Office installed. It ships as a single self-contained binary (the .NET runtime is embedded) and exposes document manipulation through a path-based CLI syntax similar to XPath. It's aimed at developers automating document generation, and at AI agents (Claude Code, Cursor, Windsurf, GitHub Copilot, and others) that need to produce or edit Office files as part of a task.

The core idea is closing a render-look-fix loop: OfficeCLI includes an HTML/PNG rendering engine that reproduces .docx/.xlsx/.pptx documents with high fidelity, so an agent (or a human watching a live preview) can see the result of an edit immediately rather than guessing at the underlying XML structure.

Key features

  • Single binary, no dependencies: no Office installation, no .NET runtime install, works headless in Docker/CI.
  • Path-based editing model: commands like officecli add deck.pptx / --type slide --prop title="Q4 Report" address elements with paths such as /slide[1]/shape[1].
  • Live preview loop: officecli watch file.pptx opens a browser preview at localhost:26315 that updates in real time as you run add/set/remove commands.
  • HTML and JSON output: view any document as an outline, rendered HTML, or structured JSON (officecli get file.pptx '/slide[1]/shape[1]' --json).
  • Deep format coverage: Word supports i18n/RTL, tables, styles, comments, tracked changes, equations, TOC, and more; Excel supports 350+ formulas, pivot tables, conditional formatting, slicers, and sparklines; PowerPoint supports animations, transitions, charts, 3D models, and SmartArt.
  • Agent skill install: officecli install auto-detects installed AI coding agents and installs the officecli skill so agents can use it without extra configuration.
  • Cross-platform binaries: prebuilt for macOS (arm64/x64), Linux (x64/arm64), and Windows (x64/arm64).

Ideal use cases

OfficeCLI fits well when you need programmatic, scriptable document generation or editing without opening a GUI. Typical scenarios: generating reports from database or API data, batch find/replace or style updates across many files, building document pipelines in CI/CD (e.g., turning test results into a Word report), and giving an AI agent the ability to create a PowerPoint deck or Excel dashboard from a natural-language prompt.

It's also a reasonable fit for headless Office automation in containers, where installing full Microsoft Office or LibreOffice isn't practical.

It is not the right tool if you need a WYSIWYG editing experience for end users, real-time collaborative editing, or pixel-perfect rendering guarantees identical to Microsoft Office's own renderer for every edge case (the HTML/PNG rendering is described as high fidelity, not a bit-for-bit Office clone). If your workflow is mostly manual document editing by non-technical staff, a CLI-driven tool adds friction rather than removing it; a GUI layer like AionUi (built on top of OfficeCLI) is a better starting point in that case.

Installation

OfficeCLI ships as a single self-contained binary. No separate .NET runtime install is needed.

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 via a package manager:

# Homebrew (macOS / Linux)
brew install officecli

# Scoop (Windows)
scoop install officecli

# npm (all platforms)
npm install -g @officecli/officecli

Or download a platform binary directly from GitHub Releases (macOS arm64/x64, Linux x64/arm64, Windows x64/arm64) and run officecli install to copy it to your PATH and register the officecli skill with any detected AI coding agents.

Verify with:

officecli --version

For AI agents, the fastest path is pointing the agent at the skill file:

curl -fsSL https://officecli.ai/SKILL.md

The agent reads this file, installs the binary, and learns the command set automatically. Once installed, a basic workflow looks like: officecli create deck.pptx, then officecli add deck.pptx / --type slide --prop title="Hello", then officecli watch deck.pptx to preview changes live, and officecli close deck.pptx to flush the session to disk.

Frequently asked questions

Share:

Stars
29K
Forks
2K
Last commit
9 days ago
Repository age
5 months
License
Apache-2.0
Self-hosted
No
Activity score
83/100
View Repository
Ad
Favicon

 

  
 

Similar to OfficeCLI

Favicon

 

  
 
Favicon

 

  
 
Favicon