@bendyline/docblocks-cli 1.1.2 → 2.1.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.
Files changed (66) hide show
  1. package/README.md +55 -94
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.js +7183 -18
  4. package/dist/index.js.map +1 -1
  5. package/package.json +12 -12
  6. package/dist/commands/build.d.ts +0 -14
  7. package/dist/commands/build.d.ts.map +0 -1
  8. package/dist/commands/build.js +0 -74
  9. package/dist/commands/build.js.map +0 -1
  10. package/dist/commands/convert.d.ts +0 -32
  11. package/dist/commands/convert.d.ts.map +0 -1
  12. package/dist/commands/convert.js +0 -168
  13. package/dist/commands/convert.js.map +0 -1
  14. package/dist/commands/init.d.ts +0 -3
  15. package/dist/commands/init.d.ts.map +0 -1
  16. package/dist/commands/init.js +0 -23
  17. package/dist/commands/init.js.map +0 -1
  18. package/dist/commands/mcp.d.ts +0 -12
  19. package/dist/commands/mcp.d.ts.map +0 -1
  20. package/dist/commands/mcp.js +0 -20
  21. package/dist/commands/mcp.js.map +0 -1
  22. package/dist/commands/parse.d.ts +0 -6
  23. package/dist/commands/parse.d.ts.map +0 -1
  24. package/dist/commands/parse.js +0 -38
  25. package/dist/commands/parse.js.map +0 -1
  26. package/dist/commands/serve.d.ts +0 -28
  27. package/dist/commands/serve.d.ts.map +0 -1
  28. package/dist/commands/serve.js +0 -182
  29. package/dist/commands/serve.js.map +0 -1
  30. package/dist/commands/themes.d.ts +0 -6
  31. package/dist/commands/themes.d.ts.map +0 -1
  32. package/dist/commands/themes.js +0 -15
  33. package/dist/commands/themes.js.map +0 -1
  34. package/dist/commands/transforms.d.ts +0 -6
  35. package/dist/commands/transforms.d.ts.map +0 -1
  36. package/dist/commands/transforms.js +0 -15
  37. package/dist/commands/transforms.js.map +0 -1
  38. package/dist/commands/video.d.ts +0 -31
  39. package/dist/commands/video.d.ts.map +0 -1
  40. package/dist/commands/video.js +0 -116
  41. package/dist/commands/video.js.map +0 -1
  42. package/dist/converters/docx-to-md.d.ts +0 -10
  43. package/dist/converters/docx-to-md.d.ts.map +0 -1
  44. package/dist/converters/docx-to-md.js +0 -17
  45. package/dist/converters/docx-to-md.js.map +0 -1
  46. package/dist/converters/pdf-to-md.d.ts +0 -14
  47. package/dist/converters/pdf-to-md.d.ts.map +0 -1
  48. package/dist/converters/pdf-to-md.js +0 -51
  49. package/dist/converters/pdf-to-md.js.map +0 -1
  50. package/dist/converters/pptx-to-md.d.ts +0 -13
  51. package/dist/converters/pptx-to-md.d.ts.map +0 -1
  52. package/dist/converters/pptx-to-md.js +0 -67
  53. package/dist/converters/pptx-to-md.js.map +0 -1
  54. package/dist/index.d.ts.map +0 -1
  55. package/dist/mcp/server.d.ts +0 -12
  56. package/dist/mcp/server.d.ts.map +0 -1
  57. package/dist/mcp/server.js +0 -518
  58. package/dist/mcp/server.js.map +0 -1
  59. package/dist/render-html.d.ts +0 -9
  60. package/dist/render-html.d.ts.map +0 -1
  61. package/dist/render-html.js +0 -60
  62. package/dist/render-html.js.map +0 -1
  63. package/dist/version.d.ts +0 -2
  64. package/dist/version.d.ts.map +0 -1
  65. package/dist/version.js +0 -15
  66. package/dist/version.js.map +0 -1
package/README.md CHANGED
@@ -1,121 +1,82 @@
1
1
  # @bendyline/docblocks-cli
2
2
 
3
- DocBlocks CLI build, serve, convert, and manage markdown document projects from the command line.
3
+ The DocBlocks command-line surface for document build and preview, linked-Squisq
4
+ format conversion, MP4 rendering, document parsing, and a local MCP server for
5
+ agents.
4
6
 
5
- ## Installation
6
-
7
- ```bash
8
- npm install -g @bendyline/docblocks-cli
9
- ```
7
+ [CLI and MCP overview](https://docblocks.com/cli/)
10
8
 
11
- ## Commands
12
-
13
- ### `docblocks init [dir]`
14
-
15
- Initialize a new DocBlocks workspace. Creates a `.docblocks` directory with configuration.
16
-
17
- ### `docblocks build`
9
+ ## Installation
18
10
 
19
- Build markdown files into HTML output.
11
+ Node.js 22.14 or newer is required.
20
12
 
21
13
  ```bash
22
- docblocks build -i ./docs -o ./dist
14
+ npm install -g @bendyline/docblocks-cli
15
+ docblocks --help
23
16
  ```
24
17
 
25
- **Options:**
26
-
27
- - `-i, --input <dir>` — Input directory (default: `.`)
28
- - `-o, --output <dir>` — Output directory (default: `dist`)
29
- - `-t, --theme <id>` — Visual theme to apply
18
+ ## Documentation
30
19
 
31
- ### `docblocks serve`
20
+ - [Authoritative CLI reference](https://github.com/bendyline/docblocks/blob/main/docs/cli.md)
21
+ - [MCP architecture and protocol guide](https://github.com/bendyline/docblocks/blob/main/docs/mcp.md)
32
22
 
33
- Start a local development server for previewing documents.
23
+ Those guides describe current input support, linked Squisq ownership, format
24
+ directions, overwrite behavior, MCP authority, artifact lifecycle, and assurance.
34
25
 
35
- **Options:**
26
+ ## Commands
36
27
 
37
- - `-p, --port <port>` — Port to listen on (default: `3000`)
38
- - `-d, --dir <dir>` — Directory to serve (default: `.`)
39
- - `-t, --theme <id>` Visual theme to apply
28
+ | Command | Purpose |
29
+ | ---------------------------------- | ----------------------------------------------------- |
30
+ | `docblocks build` | Recursively build Markdown into standalone HTML. |
31
+ | `docblocks serve` | Run a constrained local preview server. |
32
+ | `docblocks convert <input>` | Convert through the linked Squisq registry. |
33
+ | `docblocks video <input> [output]` | Render a configurable MP4. |
34
+ | `docblocks mcp` | Start the artifact-first MCP server over local stdio. |
35
+ | `docblocks themes` | List linked Squisq theme IDs. |
36
+ | `docblocks transforms` | List linked Squisq transform IDs. |
37
+ | `docblocks parse <input>` | Parse UTF-8 Markdown into Squisq Markdown AST JSON. |
40
38
 
41
- ### `docblocks convert <input>`
39
+ Use `docblocks help <command>` for the installed option summary.
42
40
 
43
- Convert a markdown document to DOCX, PPTX, PDF, HTML, or DBK container format. `<input>` can be a `.md` file, a `.zip`/`.dbk` container, or a folder.
41
+ ## Examples
44
42
 
45
43
  ```bash
46
- # Convert to all formats
47
- docblocks convert story.md
48
-
49
- # Convert to specific formats with a theme
50
- docblocks convert story.md -f docx,pdf -t cinematic
51
-
52
- # Apply a transform style before exporting
53
- docblocks convert story.md --transform documentary -o ./output
54
- ```
55
-
56
- **Options:**
57
-
58
- - `-o, --output-dir <dir>` — Output directory
59
- - `-f, --formats <list>` — Comma-separated formats: docx, pptx, pdf, html, dbk
60
- - `-t, --theme <id>` — Visual theme (use `docblocks themes` to list)
61
- - `--transform <style>` — Transform style (use `docblocks transforms` to list)
44
+ # Build and preview Markdown
45
+ docblocks build --input ./docs --output ./dist
46
+ docblocks serve --dir ./docs
62
47
 
63
- ### `docblocks video <input> [output]`
48
+ # The no-flag conversion set is exactly DOCX, PPTX, PDF, HTML, and DBK
49
+ docblocks convert story.md
64
50
 
65
- Render a document to MP4 video with synced animations. Requires ffmpeg and Playwright. `<input>` can be a `.md` file, a `.zip`/`.dbk` container, or a folder.
51
+ # Select any export-capable linked-registry formats
52
+ docblocks convert report.docx --formats md,pdf,pptx --output-dir ./exports
66
53
 
67
- ```bash
54
+ # Render MP4 with explicit media controls
68
55
  docblocks video story.md --quality high --orientation portrait
69
- ```
70
-
71
- **Options:**
72
-
73
- - `-o, --output <path>` — Output MP4 path
74
- - `--fps <number>` — Frames per second (1-120, default: 30)
75
- - `--quality <level>` — draft, normal, or high
76
- - `--orientation <orient>` — landscape or portrait
77
- - `--captions <style>` — off, standard, or social
78
- - `--width <pixels>` / `--height <pixels>` — Override dimensions
79
56
 
80
- ### `docblocks mcp`
57
+ # Discover authoring vocabulary from linked Squisq
58
+ docblocks themes
59
+ docblocks transforms
81
60
 
82
- Start an MCP (Model Context Protocol) server over stdio for AI-assisted document operations.
83
-
84
- ```bash
61
+ # Start MCP with no filesystem authority
85
62
  docblocks mcp
86
- ```
87
-
88
- **MCP Tools exposed:**
89
-
90
- - `export_markdown_to_docx` / `_pdf` / `_pptx` / `_html` / `_video` — Export markdown to polished output formats
91
- - `analyze_markdown` — Extract content structure (stats, quotes, facts, dates)
92
- - `restyle_markdown` — Apply a transform style and return restyled markdown
93
- - `list_themes` / `list_transform_styles` / `list_export_formats` — Discovery tools
94
63
 
95
- All export tools accept raw markdown text directly AI agents can write content and immediately export without temp files.
96
-
97
- **Claude Desktop / Copilot integration:**
98
-
99
- ```json
100
- {
101
- "mcpServers": {
102
- "docblocks": { "command": "npx", "args": ["docblocks", "mcp"] }
103
- }
104
- }
64
+ # Grant independent roots when an agent needs files or durable output
65
+ docblocks mcp --allow-read ./documents --allow-write ./exports
105
66
  ```
106
67
 
107
- ### `docblocks themes`
108
-
109
- List all available visual themes.
110
-
111
- ### `docblocks transforms`
112
-
113
- List all available transform styles.
114
-
115
- ### `docblocks parse <input>`
116
-
117
- Parse a markdown file and print its structure as JSON.
118
-
119
- ## License
120
-
121
- MIT
68
+ `convert` and `video` accept Markdown, Squisq JSON Doc, DBK/ZIP, folders, and
69
+ import-capable linked-registry formats. Direct `build`, `convert`, and `video`
70
+ outputs replace existing destination files; `convert` publishes each replacement
71
+ atomically after enforcing bounded input and output sizes. `build` traversal and
72
+ `parse` input/JSON output are also bounded. MCP conversions instead return
73
+ immutable session artifacts; only explicit `save_artifact` materializes one, using
74
+ no-replace or hash-conditional replacement semantics.
75
+
76
+ The live linked registry currently covers Markdown, DOCX, PDF, PPTX, XLSX, CSV,
77
+ HTML, HTML ZIP, EPUB, DBK, MP4, and GIF. Direction varies by format, so use the
78
+ CLI reference or MCP `list_formats` rather than assuming every format imports.
79
+
80
+ MP4/GIF rendering requires Chromium and FFmpeg. Install Chromium with
81
+ `npx playwright install chromium`; Squisq resolves FFmpeg from `SQUISQ_FFMPEG`,
82
+ `PATH`, or `ffmpeg-static`, in that order.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
1
+
2
+ export { }