Revise CLI menu
Changelog
Release history for revise, the CLI and TypeScript library.
3.1.7#
Released with @reviseio/editor 3.1.7, the editor's first release in
lockstep with revise: one version and one build for all three packages. A
Y.Doc or .docx moves between the editor and revise 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 revise as a command-line tool and TypeScript library
for reading, editing, and redlining Word documents.
Versions 2.x of this package were the Revise editor for React. The editor is
now @reviseio/editor; 2.x
stays installable.
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.
Removed#
- The editor entry points of 2.x.
revise/editor,revise/editor/full, andrevise/servernow throw an error pointing to@reviseio/editor, andrevise/style.cssis an empty stylesheet that says the same.