mdedit-cli 0.2.0 → 0.2.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/README.md +47 -2
- package/dist/index.js +488 -34
- package/dist/index.js.map +1 -1
- package/openclaw.json +82 -1
- package/package.json +18 -3
- package/skill.md +97 -3
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# `mdedit-cli`
|
|
2
2
|
|
|
3
|
-
Official command-line interface for [
|
|
3
|
+
Official command-line interface for [mdedit.ai](https://mdedit.ai).
|
|
4
4
|
|
|
5
5
|
Links:
|
|
6
6
|
- [CLI docs](https://docs.mdedit.ai/cli)
|
|
7
|
-
- [
|
|
7
|
+
- [mdedit.ai homepage](https://mdedit.ai)
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -41,6 +41,51 @@ mdedit info
|
|
|
41
41
|
mdedit health
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
## One-shot article edits
|
|
45
|
+
|
|
46
|
+
Apply a unique text replacement through the same article session used by live collaborators:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
mdedit article edit <articleId> --replace "old text" --with "new text"
|
|
50
|
+
mdedit article edit <articleId> --ops-file ops.json --format json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
An ops file is a non-empty JSON array of `replace`, `insert`, or `delete` operations with
|
|
54
|
+
quote, heading, section, or range anchors. The command exits `2` when an anchor is missing,
|
|
55
|
+
`3` when an anchor is ambiguous, and `4` when an edit conflict is reported. In JSON mode,
|
|
56
|
+
the result or typed error is the only value written to stdout.
|
|
57
|
+
|
|
58
|
+
## Review commands
|
|
59
|
+
|
|
60
|
+
Review agents can comment and suggest with `articles:read,reviews:write`; accepting a
|
|
61
|
+
suggestion also requires `articles:write` because it changes article text.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
mdedit review list <articleId> --status open --format json
|
|
65
|
+
mdedit review add <articleId> --quote "claim" --body "Needs a source."
|
|
66
|
+
mdedit review reply <articleId> --thread <reviewId> --body "Fixed."
|
|
67
|
+
mdedit review resolve <articleId> --thread <reviewId>
|
|
68
|
+
mdedit suggest <articleId> --quote "teh" --replace "the" --note "Typo"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
One-shot review commands use the REST review resources directly, so listing or commenting
|
|
72
|
+
does not open a metered collaboration WebSocket. Mutations always use the
|
|
73
|
+
server-authoritative `review-commands` API.
|
|
74
|
+
|
|
75
|
+
## Watch an article
|
|
76
|
+
|
|
77
|
+
Keep an article session open and stream newline-delimited JSON for agent loops:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
mdedit article watch <articleId>
|
|
81
|
+
mdedit article watch <articleId> --workspace <workspaceId> --agent claude-code
|
|
82
|
+
mdedit article watch <articleId> --poll-interval 5000
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Each stdout line is one complete JSON event. The stream starts with `session.ready`,
|
|
86
|
+
then reports article changes, review history events, and review snapshots. `Ctrl+C`
|
|
87
|
+
closes the live session cleanly. Non-collaborative articles use REST polling.
|
|
88
|
+
|
|
44
89
|
## Agent / AI tool integration
|
|
45
90
|
|
|
46
91
|
The CLI is designed to be used by AI agents without modification.
|