OfficeCLI  by iOfficeAI

AI-native CLI for Office document automation

Created 3 weeks ago

New!

1,502 stars

Top 27.1% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

OfficeCLI provides a free, open-source command-line interface for AI agents to programmatically read, edit, and automate Microsoft Office documents (Word, Excel, PowerPoint). It offers a single, self-contained binary, eliminating the need for Office installations or complex dependencies, enabling seamless integration into AI workflows and CI/CD pipelines.

How It Works

The core innovation lies in its AI-native design, exposing Office document manipulation via a robust CLI that outputs structured JSON and uses stable, path-based addressing for elements. This approach abstracts away the underlying OpenXML complexity, allowing AI agents to interact with documents deterministically. A three-layer architecture (Read, DOM, Raw XML) caters to progressive complexity, enabling efficient token usage by AI models and providing a fallback for advanced manipulation.

Quick Start & Requirements

Installation is a single command: curl -fsSL https://officecli.ai/SKILL.md | bash (macOS/Linux) or irm https://officecli.ai/SKILL.md | iex (Windows PowerShell). The tool is distributed as a self-contained binary with an embedded .NET runtime, requiring no external dependencies or Office installation. The SKILL.md file provides comprehensive instructions for AI agents.

Highlighted Details

  • AI Integration: Features a built-in MCP server to expose document operations as tools for AI agents (e.g., Claude, Cursor, VS Code/Copilot).
  • Live Preview: The watch command initiates a local HTTP server for real-time HTML previews of PowerPoint files, ideal for iterative AI-driven design.
  • Resident & Batch Modes: Supports multi-step workflows with near-zero latency via resident mode and atomic operations through batch mode.
  • Path-based Addressing: Utilizes a stable, 1-based path syntax (e.g., /slide[1]/shape[2]) for element access, simplifying AI agent navigation without XML namespace knowledge.
  • Three-Layer Architecture: Progressively exposes functionality from high-level semantic views (L1: Read) to structured element operations (L2: DOM) and raw XML access (L3: Raw XML).

Maintenance & Community

Bug reports and contributions are managed via GitHub Issues. The project is hosted on GitHub, serving as the primary hub for development and community interaction.

Licensing & Compatibility

OfficeCLI is licensed under the Apache License 2.0, which is permissive for commercial use and integration into closed-source applications. It is designed for cross-platform compatibility (macOS, Linux, Windows) and headless execution in containerized environments.

Limitations & Caveats

While robust, the tool's path-based addressing, while simplifying AI interaction, requires agents to learn OfficeCLI's specific syntax rather than standard XPath. The "Raw XML fallback" suggests that complex or non-standard manipulations might necessitate a deeper understanding of OpenXML and OfficeCLI's L3 commands. The README does not detail specific known bugs or unsupported Office features.

Health Check
Last Commit

6 hours ago

Responsiveness

Inactive

Pull Requests (30d)
34
Issues (30d)
10
Star History
1,515 stars in the last 24 days

Explore Similar Projects

Feedback? Help us improve.