logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·02.11.26
← Back to news

OfficeCLI: Office suite for AI agents to read and edit Microsoft Office files

Original article
github.com|15 points|1 comments|by maxloh|Jul 6, 2026

OfficeCLI: An AI-Native Office Suite for Document Automation

GitHub Release License

OfficeCLI is the premier, open-source suite specifically engineered to empower AI agents. It provides a streamlined way for agents to read, modify, and automate Microsoft Office files without requiring a local installation of the Office software. It is delivered as a single binary, ensuring lightweight and portable deployment.

👁️ Giving AI "Eyes" via High-Fidelity Rendering

The core innovation of OfficeCLI is its integrated HTML rendering engine. By converting .docx, .xlsx, and .pptx files into HTML or PNG formats, it allows AI agents to "see" the layout and formatting of a document.

This creates a continuous feedback loop: Render→Analyze→Correct\text{Render} \rightarrow \text{Analyze} \rightarrow \text{Correct}Render→Analyze→Correct


🚀 Getting Started

For AI Agents

You can grant an AI agent full capabilities in a single step. Simply paste the following command into the agent's chat interface:

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

Note: The SKILL.md file acts as a manual, instructing the agent on how to install the binary and execute the necessary commands autonomously.

For Human Users

Depending on your preference, you can choose between a graphical or command-line interface:

  • Option A (GUI): Install AionUi, a desktop application that leverages OfficeCLI to let you edit documents using natural language.
  • Option B (CLI): Grab the binary from the GitHub Releases page and execute: officecli install This action adds the binary to your system PATH and integrates the skill into supported AI coding tools, including:
    • Claude Code
    • Cursor
    • Windsurf
    • GitHub Copilot

Manual Installation Scripts

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

🛠️ Quick Start Guide

Live Preview Workflow

  1. Initialize Preview: Start a live watch on a file to open a browser window at http://localhost:26315. officecli watch deck.pptx
  2. Real-time Updates: In a separate terminal, add content. The browser will refresh instantly. officecli add deck.pptx / --type slide --prop title="Hello, World!"

Command Examples

Here is how to build a presentation from scratch:

# 1. Create the file
officecli create deck.pptx

# 2. Add a title slide with a specific background color
officecli add deck.pptx / --type slide --prop title="Q4 Report" --prop background=1A1A2E

# 3. Add a text shape to the first slide with precise positioning
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

# 4. Inspect the document structure as an outline
officecli view deck.pptx outline
# Output: 
# → Slide 1: Q4 Report
# → Shape 1 [TextBox]: Revenue grew 25%

# 5. Render to HTML for visual verification
officecli view deck.pptx html

# 6. Extract specific element data as JSON
officecli get deck.pptx '/slide[1]/shape[1]' --json

Example JSON Output:

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

Finally, use officecli close deck.pptx to save the session to disk.


❓ Why Choose OfficeCLI?

Traditionally, automating Office files required verbose code. The Old Way (Python):

from pptx import Presentation
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[0])
slide.shapes.title.text = "Q4 Report"
prs.save('deck.pptx')

The OfficeCLI Way: officecli add deck.pptx / --type slide --prop title="Q4 Report"

Capabilities Matrix

OfficeCLI allows agents to perform the following tasks:

  • Create: Generate documents from scratch (blank or pre-filled).
  • Read: Extract text, styles, and formulas via plain text or JSON.
  • Analyze: Detect structural errors or style inconsistencies.
  • Modify: Change fonts, colors, layouts, charts, and images.
  • Reorganize: Move or copy elements across different documents.
FormatReadModifyCreate
Word (.docx)✅✅✅
Excel (.xlsx)✅✅✅
PowerPoint (.pptx)✅✅✅

Advanced Word Processing Features

OfficeCLI provides deep support for complex Word documents, including:

  • Internationalization (i18n): Full RTL (Right-to-Left) support.
    • Locale-aware: create --locale ar-SA automatically enables RTL.
    • Scripting: Per-script font slots and BCP-47 language tags (e.g., lang.latin/ea/cs).
  • Complex Formatting:
    • Cascading directions (RTL) across sections, tables, and headers.
    • Advanced paragraph control: framePr, tabs, and character-based indents.
    • Precision runs: Underline colors and half-point positioning.
  • Structural Tools:
    • Virtual column operations for tables (add/remove/move/copy).
    • Shape manipulation: Rotation, gradients, and vertical text (eaVert / vert270).