First-party plugins for Cook Editor, and a reference for writing your own. Each plugin is a standalone npm package in its own folder.
| Plugin | Description |
|---|---|
meal-journal |
Daily meal journal in Cooklang markup. Start here — it demonstrates the most common plugin APIs. |
shopping-list |
Aisle-grouped shopping lists with pantry subtraction. Ships with Cook Editor. Shows the Cooklang API and outlets. |
pantry |
See and edit config/pantry.conf: stock levels, low and out-of-stock items, expiry. Install it from the Extensions view. Shows editing a config file through the Cooklang API. |
recipe-hub |
Search recipes.cooklang.org, preview results and save them to Drafts. Install it from the Extensions view. Shows a read-only file system provider and cooklang.api.saveDraft. |
nutriscore |
Nutri-Score badge on recipe previews, with a hover card showing how reliable it is. Needs a Cook Basic or Pro plan. Install it from the Extensions view. Shows the preview badge outlet and rendering a report template with cooklang.api.renderReport. |
allergens |
Flags the allergens you choose on recipe previews: the 14 regulated allergens (Cook Basic or Pro) and your own words (free). Install it from the Extensions view. Shows a pill preview badge and cooklang.api.refreshBadges. |
Cook Editor is built on Eclipse Theia, which runs
VS Code-style extensions: plugins are written against the
VS Code Extension API and declare their
UI contributions (commands, menus, keybindings, settings, snippets, languages)
in package.json. Cook Editor currently supports VS Code API 1.110.
At startup the app loads every plugin found in editor/plugins/ — an unpacked
.vsix layout or a plain folder with a package.json both work. The
meal-journal plugin demonstrates:
- Commands + keybindings + menus —
contributes.commands,keybindings,menus(withwhenclauses scoping buttons to.journalfiles) - Settings —
contributes.configuration, read viaworkspace.getConfiguration(...) - Language association —
contributes.languagesadding.journalto the built-incooklanglanguage, inheriting its grammar and language server - Snippets —
contributes.snippets - Status bar —
window.createStatusBarItem(...)inactivate() - Workspace file access —
workspace.fs(URI-based),workspace.findFiles - Quick-pick UI —
window.showQuickPick
For a step-by-step walkthrough, from an empty folder to a plugin published on plugins.cook.md, see the plugin tutorial.
- Copy the
meal-journalfolder structure:package.json(manifest),tsconfig.json,src/extension.tswith an exportedactivate(). - The manifest needs
name,version,publisher,engines.vscode, andmainpointing at the compiled entry point. - Keep logic that doesn't need the
vscodeAPI in separate modules — they can be unit-tested with plain mocha (seesrc/journal-files.spec.ts). - Build and deploy:
npm run deploycopies the plugin into../../editor/plugins/<publisher>.<name>. - Start the editor:
cd ../../editor && npm run start:electron. The app copieseditor/pluginsinto its own plugins folder on every start.
The dev loop is: edit → npm run deploy → restart the editor.
Releases go to the Cook plugins marketplace (an OpenVSX-compatible registry). One-time setup:
-
Sign in at https://plugins.cook.md with GitHub and create a personal access token (PAT) in your dashboard.
-
Create the namespace matching the plugin's
publisher(once per namespace):npx ovsx create-namespace cooklang -r https://plugins.cook.md -p <PAT>
To release a new version:
cd meal-journal
npm version patch # or minor/major — updates package.json
npm run package # builds meal-journal-<version>.vsix
OVSX_PAT=<PAT> npm run publish:marketplaceVerify with curl https://plugins.cook.md/api/cooklang/meal-journal.