officecli

Create, inspect, and modify Word, Excel, and PowerPoint documents via a command-line interface.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/dulltackle/kangkang-skills --skill officecli-dulltackle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: officecli
Source: https://github.com/dulltackle/kangkang-skills/tree/main/officecli
Command: npx skills add https://github.com/dulltackle/kangkang-skills --skill officecli-dulltackle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Office documents programmatically usually requires heavy libraries or an installed Office suite. This Skill lets you create, read, proofread, and modify .docx, .xlsx, and .pptx files through a single dependency-free CLI, without Microsoft Office installed. ## 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 access for full control over document structure. - Live preview and review workflows: A watch server renders documents in the browser with click-to-select, plus marks for human-reviewed edit proposals before changes hit the file. - Specialized sub-skills: Loadable rule sets for pitch decks, academic papers, financial models, data dashboards, and Morph-animated presentations. - Use Case: Build a Q4 board deck by creating slides, adding titled shapes with brand colors, inserting a revenue chart, then running view issues and validate to catch formatting problems before sharing. ## Quick Start Ask the assistant 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, or PowerPoint files from the command line?

Use officecli commands like create, add, set, and remove with XPath-style paths such as '/body/p[3]' or '/slide[1]/shape[2]'. All attributes are passed via --prop key=value, and officecli help <format> <element> lists every valid property.

How do I find and replace text in a docx or pptx file programmatically?

Run officecli set with --find and --replace, scoping the search by path: '/' for the whole document or a specific element path. Regex matching is enabled with --prop regex=true, and Word supports tracked revisions via revision.author.

Does officecli require Microsoft Office to be installed?

No. officecli is a single binary with no dependencies and works without any Office installation. It is installed via a curl or PowerShell script and verified with officecli --version.

Can officecli create pivot tables and charts in Excel files?

Yes. The add command supports pivottable with rows, cols, values, filters, and aggregation functions like sum and average, plus chart, sparkline, and conditional formatting types. Run officecli help xlsx pivottable for the full schema.

Why does my officecli path with brackets fail in the shell?

Shells like zsh and bash glob-expand square brackets, so paths like /slide[1] must be quoted: '/slide[1]'. Also note paths are 1-based while the --index flag is 0-based, except Excel row/column inserts which are 1-based.

What are the limitations of officecli watch selection?

Watch selection covers pptx shapes, tables, charts, and groups, plus top-level docx paragraphs and tables. Excel cells do not emit selectable paths, group children cannot be individually selected, and Word run-level elements are not addressable.