Uniword is Microsoft Word’s feature set, scripted. Every Ribbon tab, dialog, and pane that produces or inspects document content has a CLI command or Ruby API equivalent — with perfect OOXML round-trip fidelity, deterministic output, and three-layer verification that goes beyond what Word itself can check.
Version 1.4.0 — covers 760 OOXML elements across 22 namespaces.
1. Why uniword
-
Scriptable Word — Replace Word’s UI with one-shot CLI commands or a fluent Ruby API. No COM, no headless Office, no GUI dependency.
-
100% round-trip fidelity — Every OOXML element preserved across load-modify-save. ISO documents round-trip with zero normative differences.
-
Verification beyond Word — Three-layer pipeline: OPC package, XSD schema, and 15+ semantic rules.
uniword verify --xsdis stricter than Word’s own "Check for Issues". -
Deterministic output — Stable rIds via
Docx::IdAllocator. The same input always produces the same ZIP — diff-friendly for git. -
Repair with reporting —
uniword repairshows every applied fix with a code and message. Word’s repair is silent. -
Byte-for-byte unmodelled parts — VBA projects, glossary documents, custom XML, embedded objects: anything uniword doesn’t model is preserved verbatim instead of dropped.
2. Start here: Word for the command line
If you are new to uniword, the fastest on-ramp is the master Word UI → CLI / API mapping. It shows side-by-side what each Word feature looks like as a uniword command or Ruby call:
The 60-second tour from that page:
uniword convert brief.html brief.docx
uniword theme apply brief.docx themed.docx --name meridian
uniword styleset apply themed.docx styled.docx --name signature
uniword fonts replace styled.docx defonted.docx --from Calibri --to Carlito
uniword page setup defonted.docx paged.docx --size a4 --margins 2cm
uniword toc insert paged.docx
uniword watermark add paged.docx "DRAFT"
uniword headers add-footer paged.docx "Page "
uniword spellcheck check paged.docx
uniword protect apply paged.docx --mode tracked_changes
uniword verify final.docx --xsd
3. Quick Navigation
3.1. By Your Role
- Ruby Developer
-
Start with Quick Start, then Ruby API and Builder API.
- Technical Writer
-
Start with Themes and StyleSets, then Theme Catalog for the full list.
- QA Engineer
-
Start with Three-Layer Pipeline for DOCX verification, then verify.
- DevOps
-
Start with CLI for command-line conversion and Format Conversion for batch processing.
- Contributor
-
Start with Contributing then Adding OOXML Elements.
4. What’s new
4.1. 1.4.0 (July 2026)
-
Unmodelled parts preserved byte-for-byte — VBA projects, glossary documents,
docProps/meta.xml, custom XML, header/comment.relssidecars round-trip verbatim viaDocx::RawPart. -
MCE-aware XSD validation —
uniword verify --xsdno longer drowns in false positives forw14:paraId,mc:Ignorable, and other MCE extension content real documents always carry. -
uniword repair— Reconcile and report; the Reconciler’s deterministic fixes surfaced as a one-shot command with per-fix codes. -
uniword styles rename/remove— Word’s style rename and the Styles-pane cleanup as commands. -
uniword page setup— Word’s Page Setup dialog (size, orientation, margins) as a command. -
uniword fonts replace— Word’s Replace Fonts dialog as a one-shot command. -
uniword theme fonts/colors— Word’s Design → Fonts and Design → Colors galleries as commands. -
Comment authoring and
word/comments.xmlround-trip —Builder#commentanchors a comment around a paragraph; comments survive load-modify-save. -
Write-time integrity gate —
PackageIntegrityCheckerrefuses to write a broken package; saves raiseUniword::ValidationErrorwith structured issues. -
Consolidated validation engine —
Validation::Engineruns the same rule registry forvalidate,verify, andDocumentRoot#valid?. -
New model-level rules — DOC-200 (body required), DOC-201/202 (bookmark pairing and uniqueness), DOC-203 (empty paragraphs), DOC-204/205 (
tblrequirestblGrid/tblPr).
See the CHANGELOG for the full history.
5. Learning Path
6. Getting Help
- Found a bug?
- Have a question?
-
Search this documentation or check the CLI reference
- Want to contribute?