Skip to content

Commit a449f38

Browse files
committed
docs: mention document-mcp sibling and add it to family diagram
1 parent 48d1102 commit a449f38

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ graph TD
1414
pdfcodec("pdf-codec")
1515
mdcodec("markdown-codec")
1616
documents("documents.js")
17+
mcp("document-mcp")
1718
cli("document-cli")
1819
1920
schema --> ooxml
@@ -25,15 +26,19 @@ graph TD
2526
odf --> documents
2627
pdfcodec --> documents
2728
mdcodec --> documents
29+
documents --> mcp
30+
pdfcodec --> mcp
2831
documents --> cli
2932
odf --> cli
33+
pdfcodec --> cli
3034
3135
click schema "https://github.com/ExaDev/document-schema.js" "document-schema.js"
3236
click ooxml "https://github.com/ExaDev/ooxml.js" "ooxml.js"
3337
click odf "https://github.com/ExaDev/odf.js" "odf.js"
3438
click pdfcodec "https://github.com/ExaDev/pdf-codec" "pdf-codec"
3539
click mdcodec "https://github.com/ExaDev/markdown-codec" "markdown-codec"
3640
click documents "https://github.com/ExaDev/documents.js" "documents.js"
41+
click mcp "https://github.com/ExaDev/document-mcp" "document-mcp"
3742
click cli "https://github.com/ExaDev/document-cli" "document-cli"
3843
3944
style cli fill:#f9a825,stroke:#333,stroke-width:3px
@@ -43,6 +48,8 @@ graph TD
4348

4449
`documents.js` is a library, not a tool — everything it does happens through function calls from TypeScript/JavaScript. Most people who want to convert a docx to a PDF, extract an `.odb` table to CSV, or poke at a PDF's structure from a terminal don't want to write a script to do it. `document-cli` is that missing entry point: every one of documents.js's 27 direct conversion pairs, its generic converter, its `.odm`/`.odb` extraction functions (including a bounded SQL engine over an `.odb`'s own tables and full report rendering), its PDF inspector, and its document metadata/source-font introspection become a single command-line invocation, and its seven live-view editors (docx/pptx/odt/odp/ods/odg/markdown) become a keyboard-driven terminal app that never needs a code editor open at all.
4550

51+
[`document-mcp`](https://github.com/ExaDev/document-mcp) is the sibling frontend over the identical `documents.js` library — an MCP server rather than a terminal CLI/TUI — so the two are independent consumers of one shared implementation, each exposing whatever subset of it suits a human at a terminal versus an MCP-speaking agent.
52+
4653
The CLI and the TUI are deliberately not two separate implementations of the same logic. The TUI's own document-opening, saving, and PDF-export code (`src/tui/format/`) calls the identical `documents.js` functions the CLI commands call — `openDocx`/`createDocx`/`docxToPdf` and their five siblings per format, plus `readOdbTables`/`readPdf` for the two read-only sources — so there is exactly one place either surface can drift from what documents.js itself does: nowhere.
4754

4855
## Getting started

0 commit comments

Comments
 (0)