officecli

Create, inspect, and modify Word, Excel, and PowerPoint documents via the officecli CLI.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/Dhanuzh/DCode-Core --skill officecli-dhanuzh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: officecli
Source: https://github.com/Dhanuzh/DCode-Core/tree/main/crates/dcode-app/assets/builtin-skills/auto-inject/officecli
Command: npx skills add https://github.com/Dhanuzh/DCode-Core --skill officecli-dhanuzh

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, with structured JSON output and a layered read/edit/raw-XML strategy. ## Core Features & Use Cases - Document creation and editing: Build slides, paragraphs, tables, charts, pivot tables, and images with add/set commands using XPath-style paths and stable ID addressing. - Inspection and proofreading: Use view modes (outline, stats, issues, text, html) plus query with CSS-like selectors to find formatting or content problems, then verify with validate. - Live preview and review workflows: watch serves an auto-refreshing HTML preview with browser click-to-select, and mark proposes edits for human review before applying them. - Use Case: Generate a Q4 sales deck by creating a .pptx, adding slides with titles and styled text shapes, then running view issues and validate to confirm the file is clean before sharing. ## Quick Start Ask the assistant to create a PowerPoint file named report.pptx with a title slide and a text shape using officecli, then view its outline to confirm the structure.

Frequently Asked Questions about officecli

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

FAQPage Schema
How do I create and edit a PowerPoint file from the command line?

Use officecli create to make a blank .pptx, then officecli add to insert slides and shapes with properties like title, text, position, font, and color. Paths such as '/slide[1]' target elements, and officecli set modifies their attributes.

How do I find and replace text in a Word document 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 via revision.author properties.

Does officecli require Microsoft Office to be installed?

No. officecli is a single binary with no dependencies and works without any Office installation. Install it with the curl install script on macOS/Linux or the PowerShell installer on Windows.

Can officecli create pivot tables and charts in Excel files?

Yes. Use officecli add with --type pivottable, specifying source range, rows, cols, and values with aggregators like sum or count. Charts, sparklines, conditional formatting, and images are also supported element types.

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

Shells like bash and zsh glob-expand square brackets, so paths like /slide[1] must be quoted. Always wrap paths in single or double quotes, and pass all attributes through --prop rather than a --name flag.

What are the limitations of officecli watch selection?

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