Command line
Word documents to text, Markdown and pages from the terminal.
One binary. docboss reads .docx and .doc files, detects the format from the bytes, renders pages, converts to DOCX and composes DOCX from Markdown. Every command that reads a document takes --password, and most take an http(s):// URL read with range requests. MIT OR Apache-2.0.
docboss:; document and I/O errors exit 1, usage errors and invalid jq programs exit 2.Read
Text, Markdown, HTML and JSON.
Text has one line per paragraph with list labels, table rows tab-separated, and footnotes and endnotes after the main text. Markdown is GitHub-flavored; HTML is semantic, a body fragment unless --standalone. q runs a jq program through jaq over the same JSON as json.
$ docboss info report.docx # format, metadata, page setup, page count, counts
$ docboss text report.docx # one line per paragraph, list labels included
$ docboss text report.docx --headers-footers --comments
$ docboss text legacy.doc --no-labels -o legacy.txt
$ docboss md report.docx --images images -o report.md
$ docboss html report.docx --standalone -o report.html
$ docboss json report.docx --blocks # one object per block
$ docboss q report.docx '.metadata.title' -r
$ docboss text https://example.com/report.docx # range requests, not a downloadSubcommands
Everything the binary does.
| info | Format, metadata, page setup, page count and content counts |
|---|---|
| text | Plain text; --headers-footers, --no-notes, --comments, --no-labels, -o |
| md | GitHub-flavored Markdown; --images DIR, --embed-images, --title, --page-breaks |
| html | Semantic HTML, images embedded unless --images is given; --standalone |
| json | The document model as JSON; --blocks for the per-block view, --compact |
| q | A jq program over the JSON form of the document; -r, --blocks |
| render | Lay out and render pages to PNG, PPM, BMP or JPEG, picked by the -o extension; --page, --scale, --jpeg-quality |
| images | The document's images at their stored size and format |
| parts | The ZIP entries or compound-file streams of the container |
| hex | Hexdump the whole file or one part; --offset, --length, --width |
| xml | An XML part of a DOCX, indented; --raw as stored |
| convert | A fresh DOCX, or .md, .html, .txt or .json, by the -o extension |
| create md | CommonMark and GFM composed into a DOCX; --size letter|a4, --title |
| fonts | The fonts the document names and the faces they resolve to |
| diagnostics | Everything the reader approximated or dropped; --layout adds layout |
| tui | The interactive terminal explorer |
| skill | Install or print the skill document for coding agents |
parts, hex and xml take a local path; the other read commands also take a URL. Full flags per subcommand in the CLI reference.
Render
Pages to PNG, PPM, BMP or JPEG.
The -o extension picks the format and %d is replaced by the page number. Without --page every page is rendered, laid out once and painted on all cores. --scale is pixels per point, so 1.0 is 72 dpi and 2.0 is 144 dpi. Page numbers are 1-based on the command line.
$ docboss render report.docx --page 1 -o page.png # one page, 72 dpi
$ docboss render report.docx --scale 2 -o 'page-%d.png' # every page at 144 dpi
$ docboss render report.docx --page 1 -o page.jpg --jpeg-quality 85
$ docboss render legacy.doc -o 'legacy-%d.ppm'
$ docboss images report.docx -o images # pictures at their stored size and format
$ docboss fonts report.docx # each font and the face it resolves to hereConvert and create
DOC to DOCX, Markdown to DOCX.
$ docboss convert legacy.doc -o legacy.docx
$ docboss convert legacy.doc -o legacy.md # or .html, .txt, .json
$ docboss create md notes.md -o notes.docx --size a4 --title "Notes"
$ docboss convert locked.docx --password secret -o unlocked.docx$ docboss parts report.docx # ZIP entries with stored and unpacked sizes
$ docboss parts legacy.doc # compound-file streams
$ docboss xml report.docx word/styles.xml # one XML part, indented
$ docboss hex legacy.doc WordDocument --length 64
$ docboss diagnostics report.docx --layout
$ docboss tui report.docxA converted file carries what the model holds; embedded fonts and the theme part are not written, and convert writes a decrypted document as a plain DOCX. docboss skill install writes a skill document for coding agents into ./.claude/skills/docboss, or ~/.claude/skills/docboss with --global.