iOfficeAI /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.
★ 33,186⑂ 2,270
33,186
stars
+211+237+1,592
2,270
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
README
OfficeCLI
OfficeCLI 是全球首个、也是最好的专为 AI 智能体设计的 Office 套件。
让任何 AI 智能体完全掌控 Word、Excel 和 PowerPoint——只需一行代码。
开源免费。单一可执行文件。无需安装 Office。零依赖。全平台运行。
OfficeCLI 的内置 HTML 渲染引擎,高度还原文档原貌 —— 这正是让 AI 拥有"眼睛"的关键。 它把 .docx / .xlsx / .pptx 渲染为 HTML 或 PNG,闭合"渲染 → 看 → 改"的循环。
English | 中文 | 日本語 | 한국어
🌐 官方网站: officecli.ai | 💬 社区: Discord
在 AionUi 上使用 OfficeCLI 的 PPT 制作过程
PowerPoint 演示文稿
—
Word 文档
—
Excel 电子表格
以上所有文档均由 AI 智能体使用 OfficeCLI 全自动创建 — 无模板、无人工编辑。
AI 智能体 — 一行搞定
把这行粘贴到你的 AI 智能体对话框 — 它会自动读取技能文件并完成安装:
curl -fsSL https://officecli.ai/SKILL.md
就这一步。技能文件会教智能体如何安装二进制文件并使用所有命令。
普通用户
方式 A — 图形界面: 安装 AionUi — 一款桌面应用,用自然语言就能创建和编辑 Office 文档,底层由 OfficeCLI 驱动。只需描述你想要什么,AionUi 帮你搞定。
方式 B — 命令行: 从 GitHub Releases 下载对应平台的二进制文件,然后运行:
bash
officecli install
该命令会将二进制文件复制到 PATH,并自动将 officecli 技能文件安装到检测到的所有 AI 编程助手 — Claude Code、Cursor、Windsurf、GitHub Copilot 等。您的智能体可以立即创建、读取和编辑 Office 文档,无需额外配置。
开发者 — 30 秒亲眼看到效果
bash
1. 安装(macOS / Linux)— 也可以:brew install officecli / npm install -g @officecli/officecli
curl -fsSL https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.sh | bash
Windows (PowerShell): irm https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.ps1 | iex
2. 创建一个空白 PowerPoint
officecli create deck.pptx
3. 启动实时预览 — 浏览器自动打开 http://localhost:26315
officecli watch deck.pptx
4. 打开另一个终端,添加一页幻灯片 — 浏览器即时刷新
officecli add deck.pptx / --type slide --prop title="Hello, World!"
就这么简单。你执行的每一条 add、set、remove 命令都会实时刷新预览。继续尝试吧 — 浏览器就是你的实时反馈窗口。
快速开始
bash
创建演示文稿并添加内容
officecli create deck.pptx
officecli add deck.pptx / --type slide --prop title="Q4 Report" --prop background=1A1A2E
officecli add deck.pptx '/slide[1]' --type shape \
--prop text="Revenue grew 25%" --prop x=2cm --prop y=5cm \
--prop font=Arial --prop size=24 --prop color=FFFFFF
查看大纲
officecli view deck.pptx outline
→ Slide 1: Q4 Report
→ Shape 1 [TextBox]: Revenue grew 25%
查看 HTML — 在浏览器中打开渲染预览,无需启动服务器
officecli view deck.pptx html
获取任意元素的结构化 JSON
officecli get deck.pptx '/slide[1]/shape[1]' --json
json
{
"tag": "shape",
"path": "/slide[1]/shape[1]",
"attributes": {
"name": "TextBox 1",
"text": "Revenue grew 25%",
"x": "720000",
"y": "1800000"
}
}
为什么选择 OfficeCLI?
以前需要 50 行 Python 和 3 个独立库:
python
from pptx import Presentation
from pptx.util import Inches, Pt
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[0])
title = slide.shapes.title
title.text = "Q4 Report"
... 还有 45 行 ...
prs.save('deck.pptx')
现在只需一条命令:
bash
officecli add deck.pptx / --type slide --prop title="Q4 Report"
OfficeCLI 能做什么:
- 创建 文档 -- 空白文档或带内容的文档
- 读取 文本、结构、样式、公式 -- 纯文本或结构化 JSON
- 分析 格式问题、样式不一致和结构缺陷
- 修改 任意元素 -- 文本、字体、颜色、布局、公式、图表、图片
- 重组 内容 -- 添加、删除、移动、复制跨文档元素
| 格式 | 读取 | 修改 | 创建 |
|------|------|------|------|
| Word (.docx) | ✅ | ✅ | ✅ |
| Excel (.xlsx) | ✅ | ✅ | ✅ |
| PowerPoint (.pptx) | ✅ | ✅ | ✅ |
Word — 完整的 i18n 与 RTL 支持(按脚本字体槽位、按脚本 BCP-47 语言标签 lang.latin/ea/cs、复相关报道 (7)
blog.csdnOfficeCLI:为AI代理设计的无头Office自动化完整解决方案2026-07-31bilibili全球首个开源AI Agent原生办公套件OfficeCLI :让 Codex 直接接管 word、Excel 和 PPT,精细化编辑文档!2026-07-29jandan.netGithub推荐:OfficeCLI / 用自然语言操作Office文件2026-07-21blog.csdnOfficeCLI快速入门指南:5分钟让AI掌握Office文档处理2026-07-07blog.csdnOfficeCLI终极指南:让AI代理通过MCP服务器实现Office自动化2026-07-07livedoor ニュース無料でWord・Excel・PowerPointをあらゆるAIエージェントに完全制御させることができる「OfficeCLI」2026-07-07InfoQ.cn写代码可以 Vibe Coding 了,为什么办公还不能 Vibe Officing?2026-06-15
News & coverage (3)
Hacker NewsOfficeCLI: Office suite for AI agents to read and edit Microsoft Office files▲ 215 · 61 comments · 2026-07-06GIGAZINE'OfficeCLI' allows you to fully control Word, Excel, and PowerPoint with any AI agent, all for free.2026-07-07ad-hoc-newsOfficeCLI startet durch: 8.100 GitHub-Sterne für KI-Agenten-Suite2026-06-28