Jetformat
Word automation

Edit Word documents from the command line

Thirty-plus word verbs read and change an existing DOCX without Microsoft Office: structure as JSON, template and mail-merge filling, comments, headers, tables, images, watermarks, merge and split. Reads are free; each write is one credit.

Terminal
jetformat word inspect contract.docx --json
jetformat word template letter.docx --set customer="Acme Corp" -o letter.docx --force
jetformat word comment letter.docx --author Alice --text "fix this" -o letter.docx --force
macOS · Linux
brew install jetformat/tap/jetformat
Reading is free. Each write is one credit.Inspect, get, notes, and every other read on this page never cost anything and need no account. Commands that write a new file cost one credit per command, however many cells, paragraphs, or slides they change; 80 credits a month are free. Word to PDF costs a cent a page.

inspect

Paragraphs, tables, images, headers, content controls, styles, bookmarks, and comments.

Terminal
jetformat word inspect contract.docx --json
jetformat word tables contract.docx
jetformat word styles contract.docx
jetformat word bookmarks contract.docx

template / mail-merge / fill-fields

Content-control template, MERGEFIELD mail-merge, and legacy form fields are three different commands.

Terminal
jetformat word template letter.docx --set customer="Acme Corp" -o letter.docx --force
jetformat word mail-merge letter.docx --set Customer="Acme Corp" -o letter.docx --force
jetformat word fill-fields letter.docx --set Name=Ada -o letter.docx --force

comment / footnote / header / toc

Add or list comments, footnotes, endnotes, headers, hyperlinks, numbering, and a table of contents field.

Terminal
jetformat word comment letter.docx --author Alice --text "fix this" -o letter.docx --force
jetformat word footnote report.docx --paragraph 1 --text "see spec" -o report.docx --force
jetformat word header report.docx --text Confidential -o report.docx --force
jetformat word toc report.docx --levels 1-3 -o report.docx --force

watermark / style / add-table / add-image

Text or image watermark. Insert paragraphs, tables, and inline images into an existing DOCX — this is not creating a file from scratch.

Terminal
jetformat word watermark letter.docx --text CONFIDENTIAL -o letter.docx --force
jetformat word style report.docx --paragraph 1 --id Heading1 -o report.docx --force
jetformat word add-table report.docx --row Alpha,Beta -o report.docx --force
jetformat word add-image report.docx --paragraph 1 --image logo.png -o report.docx --force

merge / split

Merge concatenates DOCX files. Split follows section breaks, not pages. For page ranges, run word to-pdf, then pdf extract.

Terminal
jetformat word merge chapter1.docx chapter2.docx -o book.docx --force
jetformat word split report.docx -o report-parts --force

extract-images

Embedded pictures only. Scanned pages are not OCR.

Terminal
jetformat word extract-images report.docx -o report-images

Questions

Can I fill a Word template from a script?

Yes. word template sets content controls by tag or alias, word mail-merge fills MERGEFIELD codes, and word fill-fields writes legacy form fields. Pass --set name=value as many times as you need.

Does editing need Microsoft Office?

No. Jetformat has its own Go engine for the DOCX package. Nothing is launched, nothing is uploaded.

Is any of this billed?

Reads (inspect, tables, styles, comments) are free and need no account. A command that writes a new DOCX, such as template or comment, is one credit no matter how much it changes. word to-pdf costs a cent a page.

Does not

  • Creating a document from nothing; start from a template
  • Legacy .doc and macro-enabled .docm
  • Split is by section break, not page
  • Tracked changes are kept, not resolved

Convert one real file today.

Install in a minute. Reading and editing files is free forever. Writing pages comes with 80 free a month, then a plan or a pack at a cent a page.

macOS · Linux
brew install jetformat/tap/jetformat