Uniword ships with a command-line interface built on Thor. Invoke it with the uniword executable after installing the gem. The CLI surfaces nearly every Microsoft Word feature as a one-shot command — see Word for the command line for the side-by-side mapping.

1. Global options

All commands accept --verbose (-v) for detailed output.

2. Commands

2.1. Document operations

Command Description

uniword convert INPUT OUTPUT

Convert a document between DOCX, MHTML, and HTML

uniword info FILE

Display document statistics and structure

uniword validate FILE

In-memory model-level validation, prints rule-coded issues

uniword verify FILE

Three-layer DOCX verification (OPC, XSD, semantic)

uniword check FILE

Run accessibility and quality checks

uniword repair INPUT OUTPUT

Load, reconcile, and save a repaired copy with a per-fix report

uniword build TEMPLATE OUTPUT

Build document from a .docx template

uniword batch PATTERN OUTPUT_DIR

Batch convert documents

uniword metadata FILE

Display or edit document metadata

uniword generate INPUT OUTPUT

Generate DOCX from structured text (YAML/Markdown)

uniword version

Show the installed Uniword version

2.2. Document feature subcommands

Command Word equivalent

uniword theme …​

Design tab (Themes, Colors, Fonts)

uniword styleset …​

Styles pane, Style Set gallery

uniword styles …​

Styles pane — list, remove, rename

uniword fonts replace INPUT OUTPUT

Home → Replace → Replace Fonts

uniword page setup INPUT OUTPUT

Layout → Page Setup dialog

uniword toc …​

References → Table of Contents

uniword headers …​

Insert → Header & Footer

uniword images …​

Insert → Pictures

uniword watermark …​

Design → Watermark

uniword review …​

Review tab (comments and tracked changes)

uniword diff …​

Review → Compare

uniword spellcheck check FILE

Review → Spelling & Grammar

uniword protect …​

Review → Restrict Editing

uniword template …​

File → New from template

uniword resources …​

Export Word resources from a local install

3. Topics

  • convert — Format conversion

  • info — Document inspection

  • validate — Structural validation

  • verify — Three-layer verification pipeline

  • check — Quality and accessibility checks

  • repair — Repair and reconciliation

  • build — Template building

  • batch — Batch processing

  • metadata — Document metadata

  • generate — DOCX generation from structured text

  • review — Comments and tracked changes

  • diff — Document comparison

  • spellcheck — Spell and grammar checking

  • images — Image management

  • toc — Table of Contents

  • headers — Headers and footers

  • watermark — Watermarks

  • protect — Document protection

  • theme — Theme operations (apply, fonts, colors, auto)

  • styleset — StyleSet operations (list, apply, extract)

  • styles — Styles pane (list, remove, rename)

  • fonts — Replace Fonts

  • page — Page Setup dialog


Table of contents