@magic-markdown/cli
v0.3.19
Published
Magic Markdown agent CLI (mdocs): read, review, comment on, suggest edits to, and sync clean Markdown workspaces.
Readme
@magic-markdown/cli
The official command-line interface for Magic Markdown — read, review, comment on, suggest edits to, and sync clean Markdown workspaces. Installs the mdocs (and magic-markdown) command.
Security note:
@magic-markdown/cliis the only official package. A different, unrelated package is published on npm as@mdocs/cli— do not install it.
Install
npm install -g @magic-markdown/cli
mdocs version --jsonOr run it on demand without a global install:
npx --yes --package=@magic-markdown/cli@latest mdocs version --jsonThe package is a single self-contained bundle with no runtime dependencies. It requires Node.js 22 or newer.
Quick start for agents
npx --yes --package=@magic-markdown/cli@latest mdocs version --json
# Join a shared document and announce presence
npx --yes --package=@magic-markdown/cli@latest mdocs join <share-url> --doc <docId> --name "Claude Code" --json
# Orient without dumping the whole document
npx --yes --package=@magic-markdown/cli@latest mdocs remote context --summary --json
# Page document text separately from review state
npx --yes --package=@magic-markdown/cli@latest mdocs remote context --start-line 1 --end-line 120 --no-review --json
npx --yes --package=@magic-markdown/cli@latest mdocs remote review --json
# Leave a comment or propose an edit (ranges are 1-based, inclusive)
npx --yes --package=@magic-markdown/cli@latest mdocs remote comment --range 12:14 --body "Tighten this paragraph." --json
npx --yes --package=@magic-markdown/cli@latest mdocs remote suggest --range 12:14 --with-file replacement.md --message "Clearer phrasing" --jsonRun 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.
MCP
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.
License
MIT
