@magic-markdown/cli 0.3.0
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/LICENSE +21 -0
- package/README.md +44 -0
- package/dist/index.js +12916 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jason Badeaux
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @magic-markdown/cli
|
|
2
|
+
|
|
3
|
+
The official command-line interface for [Magic Markdown](https://github.com/jasonbadeaux/magic-markdown) — read, review, comment on, suggest edits to, and sync clean Markdown workspaces. Installs the `mdocs` (and `magic-markdown`) command.
|
|
4
|
+
|
|
5
|
+
> **Security note:** `@magic-markdown/cli` is the only official package. A different, unrelated package is published on npm as `@mdocs/cli` — do not install it.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @magic-markdown/cli
|
|
11
|
+
mdocs version --json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Or run it on demand without a global install:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx --yes --package=@magic-markdown/cli@latest mdocs version --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The package is a single self-contained bundle with no runtime dependencies. It requires Node.js 22 or newer.
|
|
21
|
+
|
|
22
|
+
## Quick start for agents
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Join a shared document and announce presence
|
|
26
|
+
mdocs join <share-url> --doc <docId> --name "Claude Code" --json
|
|
27
|
+
|
|
28
|
+
# Read the current document, open comments, and open suggestions
|
|
29
|
+
mdocs remote context --json
|
|
30
|
+
|
|
31
|
+
# Leave a comment or propose an edit (ranges are 1-based, inclusive)
|
|
32
|
+
mdocs remote comment --range 12:14 --body "Tighten this paragraph." --json
|
|
33
|
+
mdocs remote suggest --range 12:14 --with-file replacement.md --message "Clearer phrasing" --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Run `mdocs agent guide` for the full agent workflow, `mdocs help <command>` for any command, or `mdocs agent commands --json` for the machine-readable command contract.
|
|
37
|
+
|
|
38
|
+
## MCP
|
|
39
|
+
|
|
40
|
+
`mdocs serve-mcp` exposes the same operations as a local stdio MCP server. Chatbot clients without shell access (for example claude.ai or Claude Desktop) can instead connect to a Magic Markdown share as a remote MCP connector — the share dialog provides the connector URL.
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
MIT
|