@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.
- package/README.md +55 -94
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7183 -18
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
- package/dist/commands/build.d.ts +0 -14
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/build.js +0 -74
- package/dist/commands/build.js.map +0 -1
- package/dist/commands/convert.d.ts +0 -32
- package/dist/commands/convert.d.ts.map +0 -1
- package/dist/commands/convert.js +0 -168
- package/dist/commands/convert.js.map +0 -1
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -23
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -12
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -20
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/parse.d.ts +0 -6
- package/dist/commands/parse.d.ts.map +0 -1
- package/dist/commands/parse.js +0 -38
- package/dist/commands/parse.js.map +0 -1
- package/dist/commands/serve.d.ts +0 -28
- package/dist/commands/serve.d.ts.map +0 -1
- package/dist/commands/serve.js +0 -182
- package/dist/commands/serve.js.map +0 -1
- package/dist/commands/themes.d.ts +0 -6
- package/dist/commands/themes.d.ts.map +0 -1
- package/dist/commands/themes.js +0 -15
- package/dist/commands/themes.js.map +0 -1
- package/dist/commands/transforms.d.ts +0 -6
- package/dist/commands/transforms.d.ts.map +0 -1
- package/dist/commands/transforms.js +0 -15
- package/dist/commands/transforms.js.map +0 -1
- package/dist/commands/video.d.ts +0 -31
- package/dist/commands/video.d.ts.map +0 -1
- package/dist/commands/video.js +0 -116
- package/dist/commands/video.js.map +0 -1
- package/dist/converters/docx-to-md.d.ts +0 -10
- package/dist/converters/docx-to-md.d.ts.map +0 -1
- package/dist/converters/docx-to-md.js +0 -17
- package/dist/converters/docx-to-md.js.map +0 -1
- package/dist/converters/pdf-to-md.d.ts +0 -14
- package/dist/converters/pdf-to-md.d.ts.map +0 -1
- package/dist/converters/pdf-to-md.js +0 -51
- package/dist/converters/pdf-to-md.js.map +0 -1
- package/dist/converters/pptx-to-md.d.ts +0 -13
- package/dist/converters/pptx-to-md.d.ts.map +0 -1
- package/dist/converters/pptx-to-md.js +0 -67
- package/dist/converters/pptx-to-md.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/mcp/server.d.ts +0 -12
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -518
- package/dist/mcp/server.js.map +0 -1
- package/dist/render-html.d.ts +0 -9
- package/dist/render-html.d.ts.map +0 -1
- package/dist/render-html.js +0 -60
- package/dist/render-html.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -15
- package/dist/version.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,121 +1,82 @@
|
|
|
1
1
|
# @bendyline/docblocks-cli
|
|
2
2
|
|
|
3
|
-
DocBlocks
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g @bendyline/docblocks-cli
|
|
9
|
-
```
|
|
7
|
+
[CLI and MCP overview](https://docblocks.com/cli/)
|
|
10
8
|
|
|
11
|
-
##
|
|
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
|
-
|
|
11
|
+
Node.js 22.14 or newer is required.
|
|
20
12
|
|
|
21
13
|
```bash
|
|
22
|
-
|
|
14
|
+
npm install -g @bendyline/docblocks-cli
|
|
15
|
+
docblocks --help
|
|
23
16
|
```
|
|
24
17
|
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
23
|
+
Those guides describe current input support, linked Squisq ownership, format
|
|
24
|
+
directions, overwrite behavior, MCP authority, artifact lifecycle, and assurance.
|
|
34
25
|
|
|
35
|
-
|
|
26
|
+
## Commands
|
|
36
27
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
39
|
+
Use `docblocks help <command>` for the installed option summary.
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
## Examples
|
|
44
42
|
|
|
45
43
|
```bash
|
|
46
|
-
#
|
|
47
|
-
docblocks
|
|
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
|
-
|
|
48
|
+
# The no-flag conversion set is exactly DOCX, PPTX, PDF, HTML, and DBK
|
|
49
|
+
docblocks convert story.md
|
|
64
50
|
|
|
65
|
-
|
|
51
|
+
# Select any export-capable linked-registry formats
|
|
52
|
+
docblocks convert report.docx --formats md,pdf,pptx --output-dir ./exports
|
|
66
53
|
|
|
67
|
-
|
|
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
|
-
|
|
57
|
+
# Discover authoring vocabulary from linked Squisq
|
|
58
|
+
docblocks themes
|
|
59
|
+
docblocks transforms
|
|
81
60
|
|
|
82
|
-
Start
|
|
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
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
export { }
|