All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Security
Security
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

docx-cli: A CLI tool enabling AI agents to edit Word documents with full format fidelity

docx-cli is a command-line tool built for AI agents (like Claude and Codex) to read, edit, and comment on .docx Word documents while preserving full formatting fidelity. Instead of having AI agents manually manipulate OOXML (the underlying XML of .docx files) — which is error-prone, token-intensive, and often produces corrupted files — docx-cli provides a plain command interface plus an annotated Markdown read view. This allows AI agents to perform document tasks (filling NDAs, suggesting redlines, leaving comments) without reasoning about XML. The tool was validated through a controlled A/B bake-off comparing it against the default OOXML approach across six real document tasks.

kirillklimuk1d ago37 min readenCode
Read on github.com

Key quotes

The default way agents edit Word docs is to unzip the .docx and hand-write the OOXML inside. That takes a strong model to get right, burns tokens, and routinely produces a file Word won't open.
docx-cli hands the agent plain commands plus an annotated-Markdown read view, so it never has to reason about the XML.
We measured it — a controlled A/B bake-off: six real document tasks (fill an NDA...)

You might also wanna read

Comments

Sign in to join the conversation.

No comments yet. Be the first.