Plugin Template
2026-11-15
blc-plugin-template is the official starting point for plugins: background commands, a browser page, state saving, build config, tests and a release workflow are all set up — clone it, rename a few things and start writing your own plugin instead of guessing manifest formats from an empty directory.
What's inside:
- Example background commands and a browser view (official SDK v1, pure TypeScript; the page uses plain DOM and can switch to React/Vue);
- Page state persistence and save-contract examples, plus
node:testsuites that mock the PluginContext and never need the host running; npm run packageproducesdist-package/<name>-<version>.tgzwith a SHA-256 file in one step;- A GitHub Actions release workflow that builds, tests, packages and creates a Release on
v*tags; package name, version and artifact names are read frompackage.json, so it works unchanged after renaming.
Starting from the template
The recommended route is the GitHub template: open the repo and click "Use this template", or run gh repo create my-plugin --template biglazycat-writer/blc-plugin-template --private --clone. You can also clone it and point the remote at your own repository, download the ZIP, or call plugin_project_create from the app's MCP service (attach via MCP & External AI).
Must-change checklist
The template README has the full list; the essentials, followed by npm run build && npm test:
name,descriptionandversioninpackage.json;biglazycat.displayName/description— how the plugin appears in the host;- The command id prefix (template default
template.*): the manifest'scontributes.commands[].idandctx.commands.register(...)insrc/main.tsmust match verbatim, or the host refuses to enable the plugin; - View and menu ids and titles, plus the repo links in the README.
Manifest fields are constrained by the SDK's manifest.schema.json; field-by-field notes in SDK Manifest Schema, runtime setup and the full process in Plugin Development Process. The official Typeset export and WeChat publishing plugins are fuller reference implementations of the same structure.