document-cli 1.11.12 → 1.11.14

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 CHANGED
@@ -14,6 +14,7 @@ graph TD
14
14
  pdfcodec("pdf-codec")
15
15
  mdcodec("markdown-codec")
16
16
  documents("documents.js")
17
+ mcp("document-mcp")
17
18
  cli("document-cli")
18
19
 
19
20
  schema --> ooxml
@@ -25,8 +26,11 @@ graph TD
25
26
  odf --> documents
26
27
  pdfcodec --> documents
27
28
  mdcodec --> documents
29
+ documents --> mcp
30
+ pdfcodec --> mcp
28
31
  documents --> cli
29
32
  odf --> cli
33
+ pdfcodec --> cli
30
34
 
31
35
  click schema "https://github.com/ExaDev/document-schema.js" "document-schema.js"
32
36
  click ooxml "https://github.com/ExaDev/ooxml.js" "ooxml.js"
@@ -34,6 +38,7 @@ graph TD
34
38
  click pdfcodec "https://github.com/ExaDev/pdf-codec" "pdf-codec"
35
39
  click mdcodec "https://github.com/ExaDev/markdown-codec" "markdown-codec"
36
40
  click documents "https://github.com/ExaDev/documents.js" "documents.js"
41
+ click mcp "https://github.com/ExaDev/document-mcp" "document-mcp"
37
42
  click cli "https://github.com/ExaDev/document-cli" "document-cli"
38
43
 
39
44
  style cli fill:#f9a825,stroke:#333,stroke-width:3px
@@ -43,6 +48,8 @@ graph TD
43
48
 
44
49
  `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.
45
50
 
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
+
46
53
  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.
47
54
 
48
55
  ## Getting started
package/dist/cli.js CHANGED
@@ -347,7 +347,7 @@ function registerFontsCommand(program) {
347
347
  }
348
348
  //#endregion
349
349
  //#region src/commands/formats.ts
350
- const COMMANDS_NOT_LISTED = "odm-to-pdf, odb-to-csv, odb-to-xlsx, odb-tables, odb-forms, odb-reports, pdf-inspect, from-package, fonts, docx-extras, metadata, set-metadata";
350
+ const COMMANDS_NOT_LISTED = "odm-to-pdf, odb-to-csv, odb-to-xlsx, odb-tables, odb-forms, odb-reports, odb-query, odb-render-report, pdf-inspect, from-package, fonts, docx-extras, metadata, set-metadata";
351
351
  function registerFormatsCommand(program) {
352
352
  program.command("formats").description("list every source -> target conversion this CLI supports via a <source>-to-<target> command").option("--json", "emit the conversion list as a JSON array instead of a human-readable table", false).action((options) => {
353
353
  const { conversions } = createLocalDocumentConverter();
@@ -1046,7 +1046,7 @@ function registerSetMetadataCommand(program) {
1046
1046
  }
1047
1047
  //#endregion
1048
1048
  //#region package.json
1049
- var version = "1.11.12";
1049
+ var version = "1.11.14";
1050
1050
  //#endregion
1051
1051
  //#region src/program.ts
1052
1052
  function createProgram() {
package/dist/index.cjs CHANGED
@@ -509,7 +509,7 @@ function registerFontsCommand(program) {
509
509
  }
510
510
  //#endregion
511
511
  //#region src/commands/formats.ts
512
- const COMMANDS_NOT_LISTED = "odm-to-pdf, odb-to-csv, odb-to-xlsx, odb-tables, odb-forms, odb-reports, pdf-inspect, from-package, fonts, docx-extras, metadata, set-metadata";
512
+ const COMMANDS_NOT_LISTED = "odm-to-pdf, odb-to-csv, odb-to-xlsx, odb-tables, odb-forms, odb-reports, odb-query, odb-render-report, pdf-inspect, from-package, fonts, docx-extras, metadata, set-metadata";
513
513
  function registerFormatsCommand(program) {
514
514
  program.command("formats").description("list every source -> target conversion this CLI supports via a <source>-to-<target> command").option("--json", "emit the conversion list as a JSON array instead of a human-readable table", false).action((options) => {
515
515
  const { conversions } = (0, documents_js.createLocalDocumentConverter)();
@@ -1364,7 +1364,7 @@ function registerSetMetadataCommand(program) {
1364
1364
  }
1365
1365
  //#endregion
1366
1366
  //#region package.json
1367
- var version = "1.11.12";
1367
+ var version = "1.11.14";
1368
1368
  //#endregion
1369
1369
  //#region src/program.ts
1370
1370
  function createProgram() {
package/dist/index.js CHANGED
@@ -508,7 +508,7 @@ function registerFontsCommand(program) {
508
508
  }
509
509
  //#endregion
510
510
  //#region src/commands/formats.ts
511
- const COMMANDS_NOT_LISTED = "odm-to-pdf, odb-to-csv, odb-to-xlsx, odb-tables, odb-forms, odb-reports, pdf-inspect, from-package, fonts, docx-extras, metadata, set-metadata";
511
+ const COMMANDS_NOT_LISTED = "odm-to-pdf, odb-to-csv, odb-to-xlsx, odb-tables, odb-forms, odb-reports, odb-query, odb-render-report, pdf-inspect, from-package, fonts, docx-extras, metadata, set-metadata";
512
512
  function registerFormatsCommand(program) {
513
513
  program.command("formats").description("list every source -> target conversion this CLI supports via a <source>-to-<target> command").option("--json", "emit the conversion list as a JSON array instead of a human-readable table", false).action((options) => {
514
514
  const { conversions } = createLocalDocumentConverter();
@@ -1363,7 +1363,7 @@ function registerSetMetadataCommand(program) {
1363
1363
  }
1364
1364
  //#endregion
1365
1365
  //#region package.json
1366
- var version = "1.11.12";
1366
+ var version = "1.11.14";
1367
1367
  //#endregion
1368
1368
  //#region src/program.ts
1369
1369
  function createProgram() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-cli",
3
- "version": "1.11.12",
3
+ "version": "1.11.14",
4
4
  "description": "CLI and interactive Ink TUI for documents.js: every docx/pptx/odt/odp/ods/odg/odf/pdf/odm/odb/xlsx/markdown conversion, bridge, and editor as a scriptable command or a terminal app.",
5
5
  "type": "module",
6
6
  "repository": {