revise 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.1.2
4
+
5
+ ### Changed
6
+
7
+ - **`revise skill install` installs where the agent running it reads
8
+ skills:** `.claude/skills` from Claude Code or in a project with a
9
+ `.claude` folder, otherwise `.agents/skills`, which Codex, Cursor, Copilot,
10
+ and others read. It used to fall back to `.claude/skills`, which other
11
+ agents don't read.
12
+ - **It ends by saying to read the installed SKILL.md now:** a running agent
13
+ session doesn't load a newly installed skill; new sessions do. The
14
+ quickest install for any agent with a terminal is
15
+ `npx -y revise@latest skill install`.
16
+
3
17
  ## 3.1.1
4
18
 
5
19
  ### Changed
package/LICENSE CHANGED
@@ -19,6 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
-
23
- This package depends on @reviseio/engine, which is distributed separately
24
- under its own license (free for any use, including commercial).
package/README.md CHANGED
@@ -1,19 +1,41 @@
1
- # revise
1
+ # revise <span style="font-style: italic; font-size: 18px; font-weight: normal; margin-left: 12px">The swiss army knife for documents</span>
2
2
 
3
- Read, edit, and redline Word documents from the command line or TypeScript.
3
+ [![](https://img.shields.io/npm/v/revise)](https://www.npmjs.com/package/revise) [![](https://img.shields.io/badge/read_the-docs-blue)](https://revise.io/developer/docs/revise/cli)
4
+
5
+ Read, edit, and redline Word documents. Available as CLI and TypeScript library.
4
6
 
5
7
  ```bash
6
- npm i -g revise # or: npx revise <command>
8
+ npx revise
7
9
  ```
8
10
 
9
- AI agents using `revise` can edit documents several times faster. Paste this into your agent:
11
+ ## For Agents
12
+
13
+ AI agents using `revise` can work with Word documents several times faster.
14
+
15
+ To get started, tell your agent:
10
16
 
11
17
  ```text
12
18
  Read https://revise.io/skills/cli.md and follow it.
13
19
  ```
14
20
 
21
+ Or install the skill directly from a terminal:
22
+
23
+ ```bash
24
+ npx -y revise@latest skill install
25
+ ```
26
+
27
+ ## Install
28
+
29
+ You can also just install the `revise` CLI by itself:
30
+
31
+ ```bash
32
+ npm i -g revise
33
+ ```
34
+
15
35
  ## CLI
16
36
 
37
+ The `revise` CLI lets you inspect, edit, and convert .docx files.
38
+
17
39
  ```bash
18
40
  revise outline contract.docx # headings with block ranges
19
41
  revise read contract.docx 0 # blocks as HTML, with ids
@@ -28,6 +50,8 @@ revise export contract.docx contract.pdf # .docx .pdf .md .html
28
50
  cat notes.md | revise convert - notes.docx
29
51
  ```
30
52
 
53
+ `revise` was designed primarily for AI agents, and has a whole suite of agent-ready tools for granular editing:
54
+
31
55
  ```bash
32
56
  revise tools # every editing tool
33
57
  revise call contract.docx set_header_footer '{"side":"footer","center":"Page {PAGE} of {PAGES}"}'
@@ -39,15 +63,34 @@ revise examples # more
39
63
 
40
64
  ## Agent skills
41
65
 
66
+ Quick install:
67
+
68
+ ```bash
69
+ revise skill install # anything else
70
+ ```
71
+
72
+ Claude:
73
+
42
74
  ```bash
43
75
  claude plugin marketplace add reviseio/skills && claude plugin install cli@revise # Claude Code
76
+ ```
77
+
78
+ Codex:
79
+
80
+ ```bash
44
81
  codex plugin marketplace add reviseio/skills && codex plugin add cli@revise # Codex
82
+ ```
83
+
84
+ Via `skills`:
85
+
86
+ ```bash
45
87
  npx skills add reviseio/skills --skill revise-cli # Cursor, Copilot, Windsurf…
46
- revise skill install # anything else
47
88
  ```
48
89
 
49
90
  ## Library
50
91
 
92
+ `revise` is also available as a [TypeScript library](https://revise.io/developer/docs/revise/library).
93
+
51
94
  ```ts
52
95
  import { ReviseDocument } from "revise";
53
96
 
@@ -92,13 +135,8 @@ await doc.replaceAll("draft", "final");
92
135
  const { bytes } = await doc.export({ format: "docx" });
93
136
  ```
94
137
 
95
- ## Links
96
-
97
- [Docs](https://revise.io/developer/docs/revise/introduction) ·
98
- [Changelog](https://revise.io/developer/docs/revise/changelog) ·
99
- [Browser editor (`@reviseio/editor`)](https://www.npmjs.com/package/@reviseio/editor)
100
-
101
138
  ## License
102
139
 
103
- MIT. Runs on [`@reviseio/engine`](https://www.npmjs.com/package/@reviseio/engine),
104
- free for any use under its own license.
140
+ `revise` is available under the MIT License.
141
+
142
+ [`@reviseio/engine`](https://www.npmjs.com/package/@reviseio/engine) is free for any use under its own license.
package/cli.js CHANGED
@@ -870,8 +870,8 @@ var ui = PLAIN;
870
870
  var uiErr = PLAIN;
871
871
  function producer() {
872
872
  return {
873
- version: true ? "3.1.1" : "dev",
874
- build: true ? "2953a6472" : null
873
+ version: true ? "3.1.2" : "dev",
874
+ build: true ? "c27d8b5a5" : null
875
875
  };
876
876
  }
877
877
  var warnings = [];
@@ -2846,7 +2846,7 @@ async function cmdSkill(args, install) {
2846
2846
  text: () => markdown.replace(/\n$/, "")
2847
2847
  };
2848
2848
  }
2849
- const base = flagString(args, "dir") ?? (fs2.existsSync(".agents/skills") ? ".agents/skills" : ".claude/skills");
2849
+ const base = flagString(args, "dir") ?? skillsDirFor(io.env ?? {});
2850
2850
  const dir = path2.join(base, "revise-cli");
2851
2851
  const file = path2.join(dir, "SKILL.md");
2852
2852
  const older = path2.join(base, "revise");
@@ -2860,9 +2860,20 @@ async function cmdSkill(args, install) {
2860
2860
  }
2861
2861
  return {
2862
2862
  data: { output: path2.resolve(file), outputWritten: true },
2863
- text: () => `${ui.green("Installed")} ${dir}/ (SKILL.md and reference/)${replaced ? `, replacing the older ${older}/` : ""}`
2863
+ text: () => [
2864
+ `${ui.green("Installed")} ${dir}/ (SKILL.md and reference/)${replaced ? `, replacing the older ${older}/` : ""}.`,
2865
+ // An agent's running session doesn't load a skill installed during
2866
+ // it; new sessions do.
2867
+ `Agents: read ${file} now and follow it. New sessions load it automatically.`
2868
+ ].join("\n")
2864
2869
  };
2865
2870
  }
2871
+ function skillsDirFor(env) {
2872
+ if (env.CLAUDECODE) return ".claude/skills";
2873
+ if (fs2.existsSync(".agents/skills")) return ".agents/skills";
2874
+ if (fs2.existsSync(".claude")) return ".claude/skills";
2875
+ return ".agents/skills";
2876
+ }
2866
2877
  var RENAMED_COMMANDS = {
2867
2878
  "replace-text": "replace-all"
2868
2879
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "revise",
3
- "version": "3.1.1",
4
- "reviseBuild": "2953a6472",
3
+ "version": "3.1.2",
4
+ "reviseBuild": "c27d8b5a5",
5
5
  "description": "Read, edit, and redline Word documents from the command line or TypeScript, with tracked changes, comments, and tools for AI agents.",
6
6
  "keywords": [
7
7
  "docx",
@@ -55,7 +55,7 @@
55
55
  ],
56
56
  "sideEffects": false,
57
57
  "dependencies": {
58
- "@reviseio/engine": "3.1.1",
58
+ "@reviseio/engine": "3.1.2",
59
59
  "jszip": "^3.10.1",
60
60
  "yjs": "^13.6.27"
61
61
  },