@bloklabs/cli
v1.6.2
Published
CLI tools for Blok — convert HTML to Blok JSON, generate migration guides
Downloads
2,681
Maintainers
Readme
@bloklabs/cli
Command-line tools for Blok — the headless, Notion-like block editor whose content is JSON blocks, not HTML. Converts legacy HTML into Blok JSON and prints the Editor.js migration guide.
Install
npx @bloklabs/cli --helpOr install it locally:
npm install --save-dev @bloklabs/cliUsage
Usage: blok-cli [options]
Options:
--convert-html Convert legacy HTML from stdin to Blok JSON (stdout)
--convert-gdocs Convert Google Docs HTML from stdin to Blok JSON (stdout)
--migration Output the EditorJS to Blok migration guide (LLM-friendly)
--output <file> Write output to a file instead of stdout
--help Show this help messageConvert existing HTML to Blok JSON
npx @bloklabs/cli --convert-html < article.html --output article.jsonThe result is an OutputData document you can hand straight to new Blok({ data }).
Convert a Google Docs export
npx @bloklabs/cli --convert-gdocs < gdocs-export.html --output doc.jsonMigrating from Editor.js
npx @bloklabs/cli --migration --output migration-guide.mdThe guide is written to be pasted into an LLM alongside your codebase.
Docs
Licensed under Apache-2.0.
