docxtor
github.com/eazydraft/docxtor- Category
- Developer Tools
- Rank
- No. 2866Tools index
- Pricing
- Open Source
- Type
- TOOL
- Use case
- Data Processing
- Interfaces
- CLI · Agent Skill / Plugin
- Latest release
- v0.6.0
- Date
About
A TypeScript library, command line tool and agent skill for editing Word documents. It reads a document into a structured projection and applies targeted patches directly to the underlying XML, so tracked changes, anchored comments and revision accept or reject actions work without rewriting the file. Formatting, styles, numbering, headers, footers and tables outside the edited regions are preserved.
At a glance
docxtor is an MIT-licensed Node.js tool that lets AI agents and apps edit Microsoft Word files. It comes as an agent skill, a CLI and a TypeScript library. Instead of rebuilding the document, it patches the XML in place. Edits arrive as native tracked changes and anchored comments, and formatting outside the edited text is left alone. It is worth trying if you use an agent to redline contracts.
Good fit
Lawyers, contract managers and operations teams who already review .docx files with Claude, Codex, Cursor, Gemini CLI or Copilot and need results that open in Word as real tracked changes. Also TypeScript developers who want a model to return structured JSON patches rather than regenerate the whole file.
Consider something else when
Skip it if your documents depend on merged table cells, images, equations or newly created styles, which the project lists as unsupported, or if you need to compare two versions of a document. For a Python codebase, paper-docx is closer to your stack.
Start here
With Node.js 20 or newer installed, run npx @lucio-ai/docxtor view contract.docx --grep "payment terms" to see paragraph IDs. Then run npx @lucio-ai/docxtor replace contract.docx -o redline.docx --author "You" --find "old wording" --replace "new wording" and open redline.docx in Word. If it worked, Word shows a tracked change covering only the words that differ.
Cost and requirements
The software is free under the MIT licence. The CLI needs Node.js 20 or newer, and the library needs 20.19 or newer. For Claude.ai or Claude Cowork, upload docxtor-skill.zip under Customize, then Skills, and turn on code execution. You still pay for whatever agent or model API drives the edits.
Limits to know
The library API cannot read existing comments, although the CLI can list them. If a search phrase appears more than once, the edit is refused until you narrow it with --all, --occurrence, --in or --whole-word. CLI writes are all-or-nothing. With the library, a patch that fails partway through a batch leaves earlier patches applied unless you pass atomic: true. The claim that it is about 40% faster comes from the project's own run of seven short tasks.
Related work
- paper-docx (alternative)
- Vespper Docx MCP (alternative)
Still unclear
- Whether the tracked changes and comments it writes display correctly in Google Docs or LibreOffice. The sources only mention Microsoft Word.
Sources checked 2026-11-11. Source-based assessment.
Tags
Tech Stack
Media
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.