officecli

Create, inspect, and modify Office documents via the officecli command-line tool.

2|Updated Aug 15, 2026
One-click install
npx skills add https://github.com/Jensen-Yao/agents-skills --skill officecli-jensen-yao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: officecli
Source: https://github.com/Jensen-Yao/agents-skills/tree/main/skills/officecli
Command: npx skills add https://github.com/Jensen-Yao/agents-skills --skill officecli-jensen-yao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing .docx, .xlsx, and .pptx files programmatically usually requires Office installations or heavy libraries; this Skill lets an agent create, read, proofread, and modify Office documents through a single dependency-free CLI binary. ## Core Features & Use Cases - Layered editing model: L1 read/inspect (view, get, query, validate), L2 DOM operations (add, set, move, remove, batch), and L3 raw XML for anything the DOM layer cannot express. - Live preview and review: watch mode renders documents in a browser with click-to-select, and marks let humans review proposed edits before they are applied. - Specialized sub-skills: loadable rule sets for pitch decks, academic papers, financial models, data dashboards, and Morph-animated presentations. - Use Case: Ask the agent to build a Q4 report deck — it creates the .pptx, adds slides and styled shapes, validates the result, and previews it in the browser for your review. ## Quick Start Ask the agent to create a PowerPoint file named slides.pptx with a title slide reading "Q4 Report" and a text shape stating revenue grew 25%.

Frequently Asked Questions about officecli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit Word, Excel, and PowerPoint files from the command line?▼

Use officecli, a single-binary CLI that creates and modifies .docx, .xlsx, and .pptx files with commands like create, add, set, get, query, and remove. It works without an Office installation and supports --json for structured output.

How to find and replace text in a docx file programmatically?▼

Run officecli set with the --find and --replace flags, using / as the path for whole-document scope. It supports regex matching, case-insensitive search, and tracked revisions with an author attribute in Word documents.

Does officecli require Microsoft Office to be installed?▼

No, officecli is a single binary with no dependencies and does not need Office installed. Install it via the curl install script on macOS/Linux or the PowerShell script on Windows, then verify with officecli --version.

Can I create pivot tables in Excel from a CLI?▼

Yes, officecli add with --type pivottable creates pivot tables from a source range, accepting props for rows, cols, values with aggregators like sum and count, filters, layout, and grand totals. Date columns are auto-grouped.

Why do my officecli path arguments fail in the shell?▼

Unquoted bracketed paths like /slide[1] get glob-expanded by zsh and bash, so always quote them. Also note paths are 1-based while --index is 0-based, except Excel row/col insertion where --index is 1-based.

What are the limitations of officecli watch mode selection?▼

Watch selection covers pptx shapes, pictures, tables, charts, and groups, plus top-level docx paragraphs and tables. Excel files do not emit data-paths, group children are not individually selectable, and Word nested elements are not addressable.