Changelog
Release history for @reviseio/cli, the Revise CLI and TypeScript library.
4.4.0#
Released with revise 4.4.0, which has the full list of engine changes.
Changed#
- PDF output (
revise export,revise convertto .pdf) uses the new PDF engine: text in every script is real, shaped and searchable, files are smaller and tagged for accessibility, with heading bookmarks and clickable links. It needs a Node canvas (npm i @napi-rs/canvas, as forrevise render) and downloads the writer from revise.io on the first PDF of a run (about 2.2 MB); without either, the CLI uses the previous engine. - .docx output: tables of contents carry page numbers as Word PAGEREF fields, a file never ends with a table (Word for the web refuses one), images in table cells are kept, Title and Subtitle keep their look, and the body font is declared in the defaults.
- Edited Word files open for editing in Word for the web again and keep their fonts, underlines, cell fills, theme, paragraph border gaps and footer tab stops; page breaks inside paragraphs and table cells are kept, and a table of contents is written inside Word's contents control.
- Word files are read with Word's defaults where they state none (single spacing, Times New Roman, the table's cell margins and table style spacing), table rows break across pages as in Word, and PDF output sets Calibri text in the metric-compatible Carlito.
Fixed#
- Reading Word files: line numbering starts at the stated number, footer
PAGE/NUMPAGESfields import as live fields, and every header row of a multi-row table header is kept. - Reading HTML and Markdown:
<ol type>numbering, image aspect ratios, literal Markdown characters, CommonMark emphasis and one-line display math ($$x^2$$). - Tracked changes from different authors stay independent through
accept,rejectand .docx output. - .docx output of documents whose every run names a font (PDF imports, for example) sets Word's own footnote numbers, fields and line numbers in the body's font instead of Arial.
4.3.0#
Changed#
- Breaking: TypeScript access moves from
@reviseio/clitorevise/serverand follows the Revise SDK license, including commercial-use requirements. - The CLI wrapper remains MIT; its bundled runtime permits free command-line use, including commercial use and subprocess automation. The CLI no longer exports a library or ships binding declarations.
- Both packages bundle their runtime. New releases no longer require or publish
@reviseio/engine.
4.2.0#
Released with revise 4.2.0 and @reviseio/engine 4.2.0.
Added#
migrateDocument(ydoc). The one-time migration of table proposals stored by earlier versions. A server that hosts collaboration rooms runs it when it loads a document, before clients receive it. Idempotent; a migrated document carriestableRecordsMigratedin its metadata.ReviseDocumentmigrates a document it opens on its own.refusedin decision results.acceptandrejectmay returnrefused: [{ id, code }]for IDs they left unresolved (decision_unsupported_structure: a proposal spanning several blocks could not be settled as a whole and stays pending;decision_incomplete: a decision failed partway, which should not happen).leave_commentmanages existing threads withaction: "resolve" | "reopen" | "delete"andreply_to_comment_id.
Changed#
- Table tools need a prior read.
insert_table_row,remove_table_rows,insert_table_column,remove_table_column, andreplace_blockon a table fail withdocument_state_changedandfailure.code: "table_not_read"unless the table was read first (read_tableor a block read that includes it), and with"table_stale"if it changed since. Nothing is changed: read the table, then retry. A call that would reorder an existing table's rows, cells, or cell blocks fails withtable_order_changed. - Each tool call is one update and one undo step, and a call that fails partway leaves nothing behind.
- Earlier calls' pending revisions stay their own. Each tool call is
its own request. A later call lays its edits beside an earlier call's
(or a person's) pending revision instead of re-authoring it, or is
refused with nothing changed:
pending_revision_withdrawal(for exampleremove_blockon a block an earlier call inserted that is still pending),pending_list_changes, orpending_table_changes. - Table task messages name row ids. The table completion check,
table summary, and task status list remaining empty cells by row id
beside the 0-based
row_index(for examplerow_index 137,230 (row_ids row_138,row_231)), so agents fill the right rows.
Fixed#
- Tables edited by several people keep each other's edits: row inserts and deletions, cell content, properties, and decisions are written into the existing table.
- DOCX: tracked proposals reopen as one decidable proposal each after a
round trip; files with other namespace prefixes, Strict namespaces, or
relocated parts open; malformed packages are refused with
import_failed; exports ofrowspantables are well-formed; tabs are written asw:tab. style_blocksclears paragraph shading with anull,none, ortransparentbackground and mapslistStyleTypeto list numbering.- Independent tool edits keep earlier revision IDs; sentence-boundary edits keep unchanged words out of the revision.
4.1.0#
Released with revise 4.1.0, whose new revise/server entry point re-exports
this library. No changes to the CLI or library.
4.0.1#
Released with revise 4.0.1. No changes to the CLI or library.
4.0.0#
The CLI and TypeScript library are the @reviseio/cli package; the command is
revise. Released with revise 4.0.0 (the editor) and @reviseio/engine
4.0.0.
Added#
- Lists of figures and tables.
<toc source="captions">in tool HTML lists figure captions with page numbers;label="Table"or any other label collects that kind. A WordTOC \c "Label"field in a .docx opens as one and is written back as the same field, and it renders in PDF, Markdown, RTF, and text output. join_paragraphstakesranges. Up to 100{ firstId, lastId, separator? }ranges join runs of consecutive paragraphs, such as PDF line-wrapped text, in one call. If any range is invalid, every problem is reported and nothing changes.- Comment anchors across wrapped lines. A
leave_commentanchor or start/end pair whose text continues into the following paragraphs is anchored across them when every spanned block has been read. - Cell borders per edge and padding shorthand in
style_blocks(borderTop,borderRight,borderBottom,borderLeft;nonefor no border), andfontVariant: "small-caps".
Changed#
- Install
@reviseio/cli.npm i -g @reviseio/clifor the command,npx @reviseio/clito run it once, and@reviseio/clifor library imports. Remove an earlier global install ofrevisefirst; see upgrading. - New table rows and columns match their neighbors
(
insert_table_row,insert_table_column): borders, padding, shading, and vertical alignment come from the adjacent cell, rows under a shaded header take the body's formatting, and alternating row shading continues. replace_blockkeeps paragraph layout. Alignment, indents, spacing, line height, named style, and direction carry over unless the HTML sets them.- A
replacefind may span paragraphs. A plain-textfindwith line breaks can match the target block and the paragraphs right after it. join_paragraphskeeps line-end hyphens. "exam-" + "ple" joins as "exam-ple" when noseparatoris given.remove_blocksneeds no read for page breaks and empty paragraphs. Section breaks and formatted empty paragraphs still do.- Empty numbered items show their number in
readoutput (data-marker). - Clearer tool errors for negative
leftIndent, indents on list items, andedit_table_cellstargets inside merged cells.
Fixed#
- Pending footnotes and endnotes stay with their references through
later edits. An edit that would rebuild a block holding one fails with
pending_footnote_referenceand changes nothing. A footnote reference inside a tracked insertion or deletion in a .docx opens with its note as part of the same pending change. replaceno longer rewrites similar paragraphs next to an exact match in a table or list, andreplace_allnever fuzzy-matches.- Fewer "not fully read" refusals on tables: inserting next to a partly
read table and exact-text
replaceinside one no longer need a full read. thinstyle_blocksselectors matches only a table's header row when it has one.- Your own edits no longer count as someone else's. A block restyled by
a broad
style_blockscan be edited next without a re-read, your edits no longer invalidate your other search results, and cells of a row or column you inserted as a suggestion can be filled. - Images in
replace_blockcan become text, and an image replacement keeps the original's settings and takes px width and height. - A
replacematching an image's alt text fails with a pointer toreplace_blockinstead of reporting success without a change. letterSpacing: "normal"is accepted.- Web-search citation markers from OpenAI models are removed from tool arguments.
- PDF output embeds TrueType fonts with spec-conformant dictionaries, so strict PDF readers and printers handle it.
Security#
- jsPDF 4.2.1. PDF output is written with a fork of jsPDF 4.2.1 (was 3.0.1), which clears the advisories against 3.0.1. The third-party notices list jsPDF and the packages it inlines.
3.1.7#
Released with the editor 3.1.7: one version and one build for all three packages. A Y.Doc or .docx moves between the editor and the library unchanged.
Changed#
remove_blockstakes up to 200 ids (was 50). Past the limit it removes nothing and says how to proceed: pass a search'ssearch_result_idto remove every match, or send the ids in batches.
Fixed#
- Page numbers next to an existing header or footer.
set_page_layoutwith a page-number position, or a preset that numbers pages (APA puts them top right), used to report success while a hand-authored header or footer kept the number from appearing. The number now goes into that header's or footer's empty zone at the requested side, in the authored text's font. When the zone already holds text or the header already shows a page number, the result says so and lists the headers and footers instead of claiming the layout changed. - A
replacewhosefindandreplaceare identical fails with an error that says so, instead of the generic "no changes detected".
3.1.6#
Changed#
- The agent skill knows when revise can't run. In the Claude and ChatGPT apps, a document attached to the chat lives in a sandbox that can't install revise. The skill now stops before running anything there and offers the Revise app, which opens the document as an editable editor in the chat. If the app is connected, it uses it. Agents with a terminal are unaffected, and an install that fails on a network error is treated the same way instead of being worked around.
3.1.5#
Agents finish document tasks in fewer commands. Measured on the revise benchmark, Claude Code and Codex finish its tasks for about 40% less with revise than without it.
Added#
revise batch <file> '[...]'runs several tool calls (for example a table row and the total under it, or areplace_alland areplace) as one edit with one save. If any step fails, nothing is saved.read --section 4,7,9reads several sections at once,--blocks a..breads a range of ids, and--count Nlimits how many blocks are shown.greptakes several phrases and shows about 80 characters around each match instead of the whole block (at most 40 blocks).outlinelists headings typed as bold body text first, each with the command that turns it into a real heading.- PDF exports print the page count and paper size.
Changed#
- One
replacecall can edit several blocks: leave outidand eachfindedits the one block you've read or grepped that contains it. - Saves say what they rewrote: "Rewrote N edited blocks; the rest of the file is copied byte for byte."
readoutput is shorter: it leaves out formatting that writing the block back restores anyway (a heading's own style, default table cell borders and padding, and the like).outlineshows one id range per section (first..last) and its word count.comparesays what differs outside the redline: header and footer text and page setup, or that the rest is formatting only.--dry-runwith--outpreviews instead of failing.- The agent skill is a third shorter and lists every field of
replaceandleave_comment, so agents don't need to look them up.
Fixed#
read --blocks a,bshows only those blocks, not every block between them.outlineandread --sectionsee every section, not just the first 100.- Rows added with
insert_table_rowtake the alignment, spacing, indents, and font of the row they're copied from.
3.1.4#
Fixed#
- The package README's heading reads
revise.
3.1.3#
Changed#
- The package README has a plain heading and tagline. No changes to the CLI or the library.
3.1.2#
Changed#
revise skill installinstalls where the agent running it reads skills:.claude/skillsfrom Claude Code or in a project with a.claudefolder, otherwise.agents/skills, which Codex, Cursor, Copilot, and others read. It used to fall back to.claude/skills, which other agents don't read.- It ends by saying to read the installed SKILL.md now: a running agent
session doesn't load a newly installed skill; new sessions do. The
quickest install for any agent with a terminal is
npx -y revise@latest skill install.
3.1.1#
Changed#
- The agent skill is
revise-cli.revise skill installwrites.agents/skills/revise-cli/(or.claude/skills/revise-cli/) and replaces therevise/folder earlier versions installed. As plugins it'scli@revise:claude plugin install cli@revise,codex plugin add cli@revise, ornpx skills add reviseio/skills --skill revise-cli.
3.1.0#
Added#
--blocksonchanges,accept, andreject. Select tracked changes by block: ids (--blocks a1B2c3,d4E5f6) or a range in document order (--blocks a1B2c3..d4E5f6). Ids of list items, table cells, and paragraphs inside them work. In the library:{ blocks: [...] }, with ranges as{ from, to }.--view tracked|accepted|originalonread,grep,search,export, andconvert.readnow shows pending changes inline as<del>and<ins>with their change ids and authors;grepandsearchfind text on both sides of a change and say which side it's on.exportandconvertwith--view originalwrite the document as it was before every pending change.--finalstill means--view accepted.replace-all --ignore-caseand--exact.
Changed#
replace-textis nowreplace-all(replaceAllin the library). It replaces in page headers and footers and in footnotes and endnotes as well as the body, and says where. Curly and straight quotes, no-break and plain spaces, and no-break and plain hyphens match each other unless--exact, and the replacement keeps the document's characters:"net 30"→"net 45"keeps its no-break space. Matches it leaves alone, like other capitalization, are reported asnearMisses.replace-textandreplaceTextstill work, and JSON output run underreplace-textstill names it.--sectionis a heading and everything under it.--section 8includes 8.1 and 8.2. Numbers match whether typed or Word's automatic numbering. A title matches in full, or by text in only one heading; text in several headings is an error (section_ambiguous), and a section that doesn't exist issection_not_foundinstead of an empty result.- Clearer flag names:
new --content(was--from),new --page-size(was--page),search --results-page(was--page), and--blocksfor block ids onreadandreplace-all(was--ids). The old names still work. changeslists header, footer, and note changes as such ("Header", "Footnote 1"), with their text.
Fixed#
- Word-numbered headings. Headings numbered by Word's heading styles, how
most contracts number clauses, are headings again:
outlinelists them with their numbers ("8.1 Cap on liability") and--section 8finds them. - Comparing numbered documents. Two copies of the same numbered document compare as unchanged, instead of every numbered clause deleted and reinserted.
- Comparing against a file revise edited. A one-word edit compares as a one-word change, not a whole paragraph replaced: editing a paragraph no longer adds fonts and sizes to it or its neighbors.
- Tracked changes in headers and footers are saved as Word revisions, and ones made in Word open as pending changes.
- Markdown export numbers nested list items per level (8.1 was written
as "9."), and writes numbered headings as headings:
## 8.1 Cap on liability.
3.0.1#
Fixed#
- Windows-1252 text on Node 20. Text that isn't UTF-8, like a .txt file
from a Windows editor piped to
convert, and RTF files read € “ ” ‘ ’ – — and the other characters Windows-1252 stores in bytes 0x80–0x9F as invisible control characters. Node 22 and later were not affected.
3.0.0#
The first release of the command-line tool and TypeScript library for reading, editing, and redlining Word documents.
Added#
- The
reviseCLI. Read a document as HTML with block ids, search it, edit it with the same tools the Revise agent uses, and save the file in place, as tracked changes by default in .docx. Review withchanges,diff,accept, andreject;undoandrestorework across edits;renderdraws pages as images;export,convert,compare, andnewwrite .docx, PDF, Markdown, HTML, and text.convertalso works in a pipe:-reads stdin (the format is recognized from its bytes) or writes stdout.--out new.docxon an edit saves the result as a new file and leaves the original as it is. Every command has its own--help, and colored output on a terminal (not in pipes unlessFORCE_COLORis set; never with--json). --jsonon every command: one envelope (schema,ok,command,meta,data,warnings,error) with stable error codes, structured partial results, and exit codes that say whether anything was saved. Specified in JSON output and shipped as a JSON Schema,revise/cli-output.schema.json.ReviseDocument, the same operations as a library: open a file or bytes, run typed tools, review changes, export with a fidelity report, and snapshot and restore state.agentTools(doc, { provider }): the editing tools in the shapes the Anthropic and OpenAI SDKs expect, with a matching result formatter.- Collaboration rooms.
seedYDoc(room, file)seeds a sync server's Y.Doc on every connection (idempotent, repairs two peers that seeded at once, keeps the original Word file in the room), andReviseDocument.fromYDoc(room)edits and exports a live room. - Word fidelity. Untouched content in a .docx exports byte for byte;
xmlcommands read and patch the raw package for what the tools don't cover (styles, numbering, settings). - An agent skill:
revise skill installwrites a SKILL.md that teaches coding agents the CLI.