# Officecli

> Work with Office documents.

- Skill: `kyrie66nb/officecli` (Agent Skill, multi-file: 270 files)
- Install (CLI): `npx skillmds@latest add kyrie66nb/officecli`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kyrie66nb/officecli/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kyrie66nb (https://skillmd.com/u/kyrie66nb)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kyrie66nb/officecli

---


# officecli

AI-friendly CLI for `.docx`, `.xlsx`, `.pptx`.

## Install

```bash
if ! command -v officecli >/dev/null 2>&1; then
  curl -fsSL https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.sh | bash
fi
```

```powershell
if (-not (Get-Command officecli -ErrorAction SilentlyContinue)) {
  irm https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.ps1 | iex
}
```

Verify with `officecli --version`.

## Strategy

Prefer higher-level operations first:

- `L1` read
- `L2` DOM edit
- `L3` raw XML

Use `--json` when you need structured output.

## Help First

If you are unsure about paths or property names, run help instead of guessing:

```bash
officecli pptx set
officecli pptx set shape
officecli pptx set shape.fill
```

Swap `pptx` for `docx` or `xlsx`.

## Core Workflow

For multi-step edits, keep the file resident:

```bash
officecli open report.docx
officecli set report.docx ...
officecli close report.docx
```

For visual review and targeted edits, use watch/selection/marks:

```bash
officecli watch report.docx
officecli get report.docx selected --json
officecli mark report.docx /body/p[3] --prop find=foo --prop tofix=bar
officecli get-marks report.docx --json
officecli unmark report.docx --all
officecli unwatch report.docx
```

## Main Commands

- `create`
- `view`
- `get`
- `query`
- `validate`
- `set`
- `add`
- `move`
- `swap`
- `remove`
- `batch`
- `raw`
- `raw-set`

## Notes

- Paths are `1`-based; `--index` is `0`-based.
- Prefer stable IDs like `@id=` or `@paraId=` when a path must survive insert/delete.
- Use `view issues` to catch formatting, content, and structure problems early.
- For large documents, limit output with `--max-lines`.
- Close the file in Office/WPS before editing it.

## Related Skills

- `officecli-docx`
- `officecli-pptx`
- `officecli-xlsx`
- `officecli-academic-paper`
- `officecli-pitch-deck`
- `officecli-data-dashboard`
- `morph-ppt`


