See every page side by side: jandira-tech.github.io/neurotic_docx_bench\
jubarte vs Microsoft Word, docxide-pdf, LibreOffice, PyMuPDF Pro, MiniPdf, rdocx and office2pdf on 808 documents, DOCX to PDF, scored per page.
jubarte
Word-faithful DOCX redlines and rendering, without Word.
Compare two Word documents into native tracked changes, inspect or resolve
changes programmatically, apply validated edit plans, and render DOCX to PDF
or PNG — from Rust, Python, Node/browser, or the CLI.
Jubarte is an in-process DOCX engine for applications that need Microsoft
Word-style review workflows without automating Microsoft Word or LibreOffice.
- Compare DOCX → tracked DOCX with native insertions, deletions, moves and
formatting changes.
- List, accept or reject changes globally or selectively by change ID,
author and kind.
- Render DOCX → PDF / PNG with an independent Word-oriented layout engine.
- Inspect and edit documents safely using paragraph IDs, source hashes and
atomic JSON edit plans.
- Use the same core engine everywhere: Rust, CLI, Python and WebAssembly
for Node/browser.
- Keep the original package: relationships, styles, headers/footers,
notes, media and other DOCX parts are preserved by the comparison workflow.
Jubarte is not affiliated with Microsoft. “Word-faithful” describes
engineering targets measured against Microsoft Word behavior; it is not a
claim that every DOCX will render byte-for-byte or page-for-page identically.
Live benchmark, every page against Microsoft Word:
jandira-tech.github.io/neurotic_docx_bench
· tables: neurotic_docx_bench RESULTS.md
Feedback and contributions
Report bugs and request enhancements in the public
issue tracker, which
also archives reports and responses. English reports are welcome. See
CONTRIBUTING.md for pull requests, coding requirements,
building and tests, and SECURITY.md for private vulnerability
reports. The OpenSSF evidence review tracks the criteria
and outstanding maintainer attestations.
Quick start
Install the CLI:
cargo install jubarte
jubarte --version
Prebuilt archives are also published on
GitHub Releases.
Check the assets attached to the release you intend to install.
Compare two Word documents
jubarte original.docx modified.docx \
-o redline.docx \
--author "Reviewer"
redline.docx contains native Word tracked changes.
Without -o, jubarte prints the redline as the agent view and writes
nothing; -o redline.pdf renders it instead.
Inspect and resolve tracked changes
jubarte changes redline.docx # one change per line (a replacement is one): r12, kind, target, author, paragraph, text
# Resolve one specific change and leave the others tracked:
jubarte accept redline.docx \
-o partially-accepted.docx \
--id r12
# Or resolve everything:
jubarte accept redline.docx -o final.docx
jubarte reject redline.docx -o original-state.docx
Selection flags can be repeated and combined:
jubarte reject redline.docx \
-o reviewed.docx \
--author "Reviewer A" \
--kind formatting
Render DOCX to PDF or PNG
# PDF
jubarte convert redline.docx \
-o redline.pdf \
--revisions word \
--compress
# Page images: redline-page-01.png, redline-page-02.png, ...
jubarte convert redline.docx \
-o redline.png \
--dpi 120
No Microsoft Word or LibreOffice process is launched.
How the workflow fits together
flowchart LR
A[original.docx] --> C[Compare]
B[modified.docx] --> C
C --> D[redline.docx]
D --> E[List changes]
E --> F[Accept / Reject]
F --> G[resolved.docx]
H[DOCX] --> I[Read]
I --> J[JSON edit plan]
J --> K[Edit]
K --> L[clean.docx]
K --> M[redline.docx]
D --> N[Render]
G --> N
L --> N
M --> N
N --> O[PDF / PNG]
Documentation
Per-surface guides, each ending in a generated reference (CLI help from
the real runner, API from the shipped module) that CI keeps drift-free —
scripts/gen_docs.sh regenerates them:
- Rust guide — crate features, API tour, rendering styles,
jubarte CLI reference
- Python guide — wheel and
uvx, the three library tiers, generated API reference
- Node and browser guide —
jubarte-wasm and npx jubarte-redlines, entry points, generated API reference
Topical documents: Markdown pipeline ·
Word differences ·
Word layout rules ·
comment balloons ·
self-update ·
benchmark classes ·
bomb prevention ·
per-release API snapshots.
Install
CLI
cargo install jubarte
The installed binary is named jubarte.
The Python wheel and the npm package also run the CLI without an
install:
uvx --from jubarte-docx jubarte redline a.docx b.docx -o redline.docx
npx jubarte-redlines redline a.docx b.docx -o redline.docx
Both runners speak the shared command set — compare/redline, diff,
changes, accept, reject, read, edit, add,
convert, capabilities — and share the Rust clap parser for help,
defaults, aliases and usage errors. The Python wheel also runs comments,
validate and visual-diff; append, scrub, debug and self-update
remain in the binary. The npm CLI renders no PNG pages
(jubarte-wasm/cli/README.md).
For a GitHub-style text review of two Word documents:
jubarte diff a.docx b.docx --format github
jubarte diff a.docx b.docx --format github --context 5 -o changes.patch
uvx --from jubarte-docx jubarte diff a.docx b.docx --format github
npx jubarte-redlines diff a.docx b.docx --format github
github (also unified or text) prints a standard unified patch with
diff --git, file headers, hunk ranges and context. It compares the complete
debug -c text view, including existing revision marks and story text in
headers, footers, notes, comments, tables and text boxes. It extracts all content before display clipping and never caps the number of changes, and does not create an implicit
DOCX. Header/footer part renumbering is paired by section role. This is a
patch of extracted text, for review; it cannot patch a binary DOCX.
Formatting and media differences belong to compare, debug or visual-diff.
CriticMarkup keeps its existing role: representing a document's current
content with its tracked marks and comments. github gives a separate
comparison of those contents; it does not accept, reject or reinterpret the
marks unless --accept-changes is requested. --format word always accepts
ALL changes in both inputs first, then produces fresh word-level CriticMarkup.
normal, context and side-by-side are also available. Long lines show a
70-character window around the first change; --full-lines shows everything.
See text diff details.
Markdown sits beside Word: jubarte diff prints the changes between any
two documents, Word or Markdown, as a git-style patch; jubarte convert draft.md writes CommonMark (with CriticMarkup as tracked changes) to
DOCX/PDF/PNG; and jubarte edit writes the redline's patch as
patch.diff. See docs/MARKDOWN.md.
For a source checkout, the repository also contains installation scripts that
can install supplemental fonts used by the renderer:
scripts/install.sh
scripts/install.sh --fonts-only
On Windows, see scripts/install.ps1.
Rust library
cargo add jubarte --no-default-features
The crate is jubarte, the import path jubarte. It re-exports the
workspace crates (jubarte-dom, jubarte-opc, jubarte-redlines for
comparison, jubarte-render, jubarte-doc, jubarte-markdown,
jubarte-edit), which can also be depended on alone.
Since 0.19.0, jubarte-redlines on crates.io is the compare-only crate
(library name jubarte_redlines); a 0.18 dependency on jubarte-redlines
moves to jubarte = "0.19" and keeps its use jubarte::… paths (see the
changelog).
use jubarte::{convert, document_comparer};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let original = std::fs::read("original.docx")?;
let modified = std::fs::read("modified.docx")?;
let redline =
document_comparer::compare_documents(&original, &modified, "Reviewer")?;
std::fs::write("redline.docx", &redline)?;
let pdf = convert::docx_to_pdf(&redline)?;
std::fs::write("redline.pdf", &pdf)?;
Ok(())
}
The default crate features include the CLI, fast allocator, self-update
support and the embedded fonts (embedded-fonts). Library-only consumers
can disable defaults and opt into features deliberately. cli on its own
(--no-default-features --features cli) builds without the 16 embedded font
programs: a render then takes its faces from the document and the machine,
and refuses a family the document does not embed, the machine does not
have, and no open substitute covers with FONT_UNAVAILABLE, before writing
anything.
MSRV: Rust 1.94.
Python
Python requires CPython 3.10 or later.
pip install jubarte-docx
Low-level byte API:
from pathlib import Path
from jubarte import (
compare_documents,
get_revisions,
docx_to_pdf,
)
original = Path("original.docx").read_bytes()
modified = Path("modified.docx").read_bytes()
redline = compare_documents(
original,
modified,
author="Reviewer",
)
Path("redline.docx").write_bytes(redline)
for revision in get_revisions(redline):
print(revision)
Path("redline.pdf").write_bytes(
docx_to_pdf(redline, revisions="word")
)
The richer Document API additionally supports inspection, Markdown
projection, selective change resolution, edit plans, PDF/PNG rendering and
preview.
Node and browser
Node 18+:
npm install jubarte-wasm
const {
compareDocuments,
docxToPdf,
listChanges,
acceptChanges,
rejectChanges,
} = require("jubarte-wasm");
const redline = compareDocuments(originalBytes, modifiedBytes, "Reviewer");
const pdf = docxToPdf(redline, false, "word");
For applications that do not need the PDF renderer, use the slim package
exports:
const {
compareDocuments
} = require("jubarte-wasm/slim");
Browser builds are exported from jubarte-wasm/web and
jubarte-wasm/web-slim.
MCP server and Agent Skill
Jubarte is an MCP server for Word documents: read, edit, compare, validate
and render .docx, every edit returned as a clean copy plus a Word redline.
It is listed in the MCP Registry
as io.github.jandira-tech/jubarte. With uv
installed, one command runs it on any platform:
uvx --from 'jubarte-docx[mcp]' jubarte-mcp --root /absolute/documents
From 0.21.1, uvx jubarte-mcp --root /absolute/documents is the same
command (the jubarte-mcp package on PyPI).
| Client |
Install |
| Claude Code (2.1.275+) |
/plugin install jubarte --marketplace jandira-tech/jubarte (server and skill), or claude mcp add jubarte -- uvx --from 'jubarte-docx[mcp]' jubarte-mcp --root "$PWD" |
| Claude Desktop |
the signed .mcpb for your platform from the releases (native engine, no Python) |
| Gemini CLI |
gemini extensions install https://github.com/jandira-tech/jubarte |
| Codex |
codex mcp add jubarte -- uvx --from 'jubarte-docx[mcp]' jubarte-mcp --root /absolute/documents, or the plugin at this repository's root (.codex-plugin/) |
| Cursor, VS Code, Windsurf, Zed, any JSON config |
{"mcpServers": {"jubarte": {"command": "uvx", "args": ["--from", "jubarte-docx[mcp]", "jubarte-mcp", "--root", "/absolute/documents"]}}} |
| Agent Skills folder |
cp -R skill/jubarte /absolute/project/.agents/skills/ from a release's skill ZIP |
--root is the one folder the server may read and write. docx_view
accepts at most five rendered pages per call; larger requests return
INVALID_ARGUMENT. The .mcpb bundles, plugin ZIPs and skill ZIPs carry the
native jubarte mcp with its fonts embedded, per platform; the
installation guide explains VERSION, TARGET and
PLATFORM, extraction and verification. Run jubarte doctor --json to see
which fonts a render will use.
| Native per-platform install |
After download and extraction |
| Claude Code, pinned archive |
/plugin install jubarte-full-macos-aarch64 --marketplace jandira-tech/jubarte (choose your platform) |
| Gemini CLI extension |
gemini extensions install "$(pwd)/plugin" |
| Codex |
codex mcp add jubarte -- "$(pwd)/skill/jubarte/bin/jubarte" mcp --root /absolute/documents |
| Direct stdio |
/absolute/path/to/skill/jubarte/bin/jubarte mcp --root /absolute/documents |
skills.sh / agentskills listings and Codex's plugin loader are covered in the
skill guide. Tool schemas, security and protocol:
docs/adoption/mcp.md.
CLI reference
Every command, from jubarte --help (regenerated by scripts/gen_docs.sh).
The complete per-command --help of every runner (the jubarte binary, the
Python wheel, the npm CLI) is in the per-surface guides.