Officecli
OfficeCLI is the first and best 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.
Last verified:
What is Officecli?
OfficeCLI is the first and best Office suite purpose-built for AI agents to read, edit, and automate Microsoft Office documents (Word/.docx, Excel/.xlsx, and PowerPoint/.pptx). It is a free, open-source command-line interface that delivers Office automation through a single self-contained binary, eliminating the need for Microsoft Office installation or complex dependencies like Python environments or npm packages.
The tool features a three-layer architecture (L1 Read, L2 DOM edit, L3 Raw XML) that caters to progressive complexity, enabling efficient token usage by AI models. Key capabilities include creating blank documents, reading and inspecting files with structured JSON output, editing existing files in place, adding new elements (slides, paragraphs, rows, cells, charts, pictures), modifying properties (colors, fonts, spacing), finding and replacing text with regex support, sorting Excel data, creating pivot tables, and raw XML manipulation for advanced users. It supports stable ID-based addressing for reliable multi-step workflows.
OfficeCLI is designed specifically for AI agents and automation pipelines that need headless document processing. It is ideal for developers building CI/CD pipelines, AI workflow integrations (especially with Claude Code), server/container environments (Docker, GitHub Actions, Lambda), and teams automating repetitive business operations like document generation, data processing, and batch file operations. The tool runs on Windows, macOS, and Linux.
The CLI outputs structured JSON that is easy to parse by AI models, uses predictable exit codes and error messages for reliable agent integration, and includes a live HTML preview feature (watch mode) for interactive selection. Specialized skills are available for specific use cases including academic papers, pitch decks, morph animations, financial models, and data dashboards.
Officecli pricing
Pricing model: Freemium
OfficeCLI is free and open-source under Apache License 2.0, which is permissive for commercial use and integration into closed-source applications. The local-first CLI tool is completely free with no paid tiers for the core binary. The website also offers External/Hosted Mode: 500 hosted credits for $5 for recurring individual usage, and Hosted 2000 credits for $19 as the best value option. External Mode remains free and unlimited. The tool can be installed via single command on macOS/Linux (curl -fsSL https://d.officecli.ai/install.sh | bash) or Windows PowerShell (irm https://d.officecli.ai/install.ps1 | iex), or downloaded as a binary from GitHub Releases.
Officecli pros
- Free and open-source under Apache License 2.0
- Single self-contained binary with embedded .NET runtime
- No Microsoft Office installation required
- No Python, npm, or external dependencies needed
- Works headless in Docker, GitHub Actions, Lambda, and containers
- Structured JSON output easy for AI agents to parse
- Supports Word, Excel, and PowerPoint (.docx, .xlsx, .pptx)
- Three-layer architecture for progressive complexity (L1/L2/L3)
- Stable ID-based addressing prevents index shifting
- Foundational tool with 4300+ GitHub stars
- Live HTML preview with interactive click-to-select (watch mode)
- Batch operations support multiple commands in one save cycle
- Pivot table creation with full aggregation options
- Regex support for find and replace operations
- Cross-platform support: Windows, macOS, Linux
- Specialized skills for niche use cases (pitch decks, academic papers, morph animations)
- CSS-like query selectors for element targeting
- Resident mode auto-starts for 60s idle timeout reducing file I/O overhead
Officecli cons
- Command-line interface only, no GUI
- Steep learning curve for non-technical users
- Requires understanding of XML paths and CLI syntax
- Excel xlsx does not emit data-path for marks/selection
- Group shapes in PPT cannot drill into individual children
- Word nested elements (table cells, run-level) not addressable
- Case-sensitive find by default (requires regex for case-insensitive)
- No match in find operation is silent success (may hide errors)
- File must be closed in PowerPoint/WPS before modification
- Positional indices shift on insert/delete without stable IDs
Frequently asked questions about Officecli
What is OfficeCLI and what does it do?
OfficeCLI is the first Office suite purpose-built for AI agents to read, edit, and automate Microsoft Office documents (.docx, .xlsx, .pptx). It provides a command-line interface that allows AI agents to programmatically create, analyze, proofread, and modify Office files through natural language commands translated into precise Office operations. The tool outputs structured JSON and uses stable, path-based addressing for deterministic document manipulation.
Do I need Microsoft Office installed to use OfficeCLI?
No, OfficeCLI does not require Microsoft Office installation. It is distributed as a single self-contained binary with an embedded .NET runtime, requiring no external dependencies. You can drop it into any server, container, or CI environment and it works immediately without an Office license.
How do I install OfficeCLI?
Installation is a single command. For macOS/Linux: curl -fsSL https://d.officecli.ai/install.sh | bash. For Windows PowerShell: irm https://d.officecli.ai/install.ps1 | iex. Alternatively, download the binary from GitHub Releases for your platform (e.g., officecli-linux-amd64), make it executable with chmod +x, and run it directly. Verify installation with officecli --version.
What file formats does OfficeCLI support?
OfficeCLI supports Microsoft Office formats: Word (.docx), Excel (.xlsx), and PowerPoint (.pptx). It can read, edit, and create files in all three formats. The tool works with OpenXML standards and can validate files against OpenXML schema.
How does OfficeCLI differ from general-purpose LLMs for Office tasks?
OfficeCLI uses a purpose-trained model specifically on Office document operations, achieving higher accuracy than general-purpose LLMs on formatting, styling, and structural document tasks. Its AI-native design exposes Office document manipulation via a robust CLI with structured JSON output and stable path-based addressing, abstracting away OpenXML complexity for deterministic AI agent interaction.
What is the three-layer architecture in OfficeCLI?
OfficeCLI uses a three-layer architecture: L1 (Read) for creating, reading, and inspecting documents; L2 (DOM edit) for modifying properties and adding elements; L3 (Raw XML) for advanced manipulation when L2 cannot express what you need. The system always prefers higher layers for efficiency. Add --json flag for structured output.
Can I use OfficeCLI with AI agents like Claude Code?
Yes, OfficeCLI is designed specifically for AI agent use. The CLI interface is structured for Claude Code and agent pipelines with predictable output formats, exit codes, and error messages that agents can parse reliably. In Claude Code, you use the Bash tool to call officecli, then process the JSON output. The tool is available on all paid Claude plans through Microsoft AppSource.
How do I handle text find and replace in OfficeCLI?
Use the find prop with set command: officecli set doc.docx / --prop find=draft --prop replace=final for whole-document replacement. For formatting matched text: officecli set doc.docx '/body/p[1]' --prop find=weather --prop bold=true --prop color=red. Regex is supported with --prop regex=true. Case-sensitive by default; use (?i) prefix for case-insensitive regex.
What is the watch mode in OfficeCLI?
Watch mode provides a live HTML preview that auto-refreshes on every file change. Open the printed localhost URL in a browser, then click/shift-click/box-drag to select shapes. The CLI can read the current browser selection with 'officecli get <file> selected'. Selection survives file edits when using stable @id paths. All connected browsers share one selection with last-write-wins behavior.
Is OfficeCLI free for commercial use?
Yes, OfficeCLI is licensed under Apache License 2.0, which is permissive for commercial use and integration into closed-source applications. The core CLI tool is completely free and open-source with no paid tiers required for commercial usage.