mdedit-cli 0.4.2 → 0.4.4
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/README.md +28 -26
- package/dist/index.js +370 -47
- package/dist/index.js.map +1 -1
- package/openclaw.json +61 -61
- package/package.json +3 -3
- package/skills/catalog.json +11 -11
- package/skills/find-mdedit-document/cli/SKILL.md +3 -3
- package/skills/find-mdedit-document/mcp/SKILL.md +3 -3
- package/skills/publish-mdedit-document/cli/SKILL.md +4 -4
- package/skills/publish-mdedit-document/mcp/SKILL.md +1 -1
- package/skills/review-mdedit-document/cli/SKILL.md +5 -5
- package/skills/review-mdedit-document/mcp/SKILL.md +1 -1
- package/skills/revise-mdedit-document/cli/SKILL.md +5 -5
- package/skills/revise-mdedit-document/mcp/SKILL.md +1 -1
- package/skills/save-mdedit-document/cli/SKILL.md +3 -3
- package/skills/save-mdedit-document/mcp/SKILL.md +3 -4
package/README.md
CHANGED
|
@@ -54,13 +54,13 @@ mdedit info
|
|
|
54
54
|
mdedit health
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
## One-shot
|
|
57
|
+
## One-shot document edits
|
|
58
58
|
|
|
59
|
-
Apply a unique text replacement through the same
|
|
59
|
+
Apply a unique text replacement through the same document session used by live collaborators:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
mdedit
|
|
63
|
-
mdedit
|
|
62
|
+
mdedit document edit <documentId> --replace "old text" --with "new text"
|
|
63
|
+
mdedit document edit <documentId> --ops-file ops.json --format json
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
An ops file is a non-empty JSON array of `replace`, `insert`, or `delete` operations with
|
|
@@ -75,18 +75,18 @@ Use a key with `publishing:write` to create a public `mded.it` link. New links a
|
|
|
75
75
|
Use `--snapshot` for a frozen artifact that changes only when you publish again.
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
mdedit
|
|
79
|
-
mdedit
|
|
80
|
-
mdedit
|
|
81
|
-
mdedit
|
|
82
|
-
mdedit
|
|
78
|
+
mdedit document publish <documentId>
|
|
79
|
+
mdedit document publish <documentId> --snapshot
|
|
80
|
+
mdedit document publish <documentId> --slug my-document
|
|
81
|
+
mdedit document publish-status <documentId> --format json
|
|
82
|
+
mdedit document unpublish <documentId> --yes
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
Create a document from Markdown and publish a Live link in one command, without a
|
|
86
86
|
confirmation flag:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
mdedit
|
|
89
|
+
mdedit document create \
|
|
90
90
|
--file document.md \
|
|
91
91
|
--publish
|
|
92
92
|
```
|
|
@@ -101,42 +101,44 @@ mode. Use `--live` or `--snapshot` to switch deliberately; the URL does not chan
|
|
|
101
101
|
Links created before Live mode remain Snapshots until explicitly switched:
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
mdedit
|
|
104
|
+
mdedit document publish <documentId> --live
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
If
|
|
108
|
-
the command reports its
|
|
107
|
+
If document creation succeeds but publishing fails, the document is kept private and
|
|
108
|
+
the command reports its API `articleId`.
|
|
109
109
|
|
|
110
110
|
## Review commands
|
|
111
111
|
|
|
112
112
|
Review agents can comment and suggest with `articles:read,reviews:write`; accepting a
|
|
113
|
-
suggestion also requires `articles:write` because it changes
|
|
113
|
+
suggestion also requires `articles:write` because it changes document text.
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
|
-
mdedit review list <
|
|
117
|
-
mdedit review add <
|
|
118
|
-
mdedit review reply <
|
|
119
|
-
mdedit review resolve <
|
|
120
|
-
mdedit suggest <
|
|
116
|
+
mdedit review list <documentId> --status open --format json
|
|
117
|
+
mdedit review add <documentId> --quote "claim" --body "Needs a source."
|
|
118
|
+
mdedit review reply <documentId> --thread <reviewId> --body "Fixed."
|
|
119
|
+
mdedit review resolve <documentId> --thread <reviewId>
|
|
120
|
+
mdedit suggest <documentId> --quote "teh" --replace "the" --note "Typo"
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
One-shot review commands use the REST review resources directly, so listing or commenting
|
|
124
124
|
does not open a metered collaboration WebSocket. Mutations always use the
|
|
125
125
|
server-authoritative `review-commands` API.
|
|
126
126
|
|
|
127
|
-
## Watch
|
|
127
|
+
## Watch a document
|
|
128
128
|
|
|
129
|
-
Keep
|
|
129
|
+
Keep a document session open and stream newline-delimited JSON for agent loops:
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
mdedit
|
|
133
|
-
mdedit
|
|
134
|
-
mdedit
|
|
132
|
+
mdedit document watch <documentId>
|
|
133
|
+
mdedit document watch <documentId> --workspace <workspaceId> --agent claude-code
|
|
134
|
+
mdedit document watch <documentId> --poll-interval 5000
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
Each stdout line is one complete JSON event. The stream starts with `session.ready`,
|
|
138
|
-
then reports
|
|
139
|
-
closes the live session cleanly. Non-collaborative
|
|
138
|
+
then reports document changes, review history events, and review snapshots. `Ctrl+C`
|
|
139
|
+
closes the live session cleanly. Non-collaborative documents use REST polling.
|
|
140
|
+
|
|
141
|
+
`mdedit article` remains available as a deprecated compatibility alias. New scripts should use `mdedit document`.
|
|
140
142
|
|
|
141
143
|
## Agent / AI tool integration
|
|
142
144
|
|