create-blok-plugin
v0.2.0
Published
Scaffold a new plugin for the Blok visual editor. Zero-dep CLI that generates a typed plugin with a block, a custom field type, and a left-rail panel.
Maintainers
Readme
create-blok-plugin
Scaffold a new plugin for the Blok visual editor.
Usage
npm create blok-plugin@latest my-plugin
# or
npx create-blok-plugin my-plugin
# or
pnpm create blok-plugin my-pluginThis creates a my-plugin/ directory containing a ready-to-publish plugin with:
- A custom block (a tilt-able quote card).
- A custom field type (a tags input used by the block).
- A custom left-rail panel (a quick scratchpad).
- TypeScript config,
package.json, and aREADMEexplaining the layout.
Options
| Flag | Description |
| ----------------- | --------------------------------------------------------------- |
| <name> | Directory + package name. Required unless --help is passed. |
| --template, -t | full (default) or minimal — just a block, no field / panel. |
| --force, -f | Overwrite an existing directory. |
| --help, -h | Print usage. |
After scaffolding
cd my-plugin
npm install
npm run buildThen import your plugin into a host app:
import { Blok } from "@useblok/core";
import myPlugin from "my-plugin";
<Blok config={config} plugins={[myPlugin]} />;See the generated README.md for the full walkthrough.
