Plugins: your own, one from npm, one from the registry
Two kinds. A registry plugin is installed into the site’s database, as the admin’s Install button does: no package, no config line. A package plugin is in package.json and astro.config.mjs, and the task writes both.
From EmDash’s registry
mise run plugin:search -- forms # find one: it prints @publisher/slug
mise run plugin:install -- @masonjames.com/contact-forms --yes # it prints what the plugin asks for; --yes agrees
mise run plugin:works -- @masonjames.com/contact-forms # does it load and answer? one line per check
mise run plugin:favourites -- --yes # the favourites, in one go
mise run plugin:update -- @meekmedia.bsky.social/bulletin@0.1.1 # to the release you name
mise run plugin:remove -- @masonjames.com/contact-forms
Without --yes, plugin:install prints what a plugin asks for and stops at one that can change things or reach outside the site.
These act on this machine’s built site (site:preview), starting it and signing in if needed. With -- --live they act on the deployed site, after signin:token -- --live; with LIVE_PREVIEW=<name> as well, on that preview of it.
On a deployed Cloudflare site, plugin:install, plugin:favourites, plugin:update, plugin:remove, and plugin:works for one plugin passed with --live on 2026-10-09. plugin:works -- --live with no name, every plugin the site has, does not hold there: straight after the installs it failed in three runs of four, a different way each time — a plugin’s admin page refused, or a plugin listed as active and not in the admin’s manifest. The task says each in a FAIL line and fails, which is what a person opening that page is shown (Upstream issues). The test runs that check on this machine only.
The dev site shares the built site’s database, so the plugins are there too. A dev site that is already running does not load a plugin installed this way until it is started again: mise run site:stop, then mise run site:start.
A registry plugin runs in EmDash’s sandbox, which a new site does not have switched on. On this machine the tasks switch it on first (plugin:sandbox); a deployed site has to be deployed with it on: mise run plugin:sandbox, then mise run live:ship.
What each task prints and when it needs --yes is its description: plugin:install, plugin:update, plugin:works. The favourites, why each is one, and every plugin that was tried: Favourite plugins. Your own list: PLUGINS = "@a/one @b/two" under [env].
See seven do their real thing
mise run plugin:demo
plugin:works says a plugin loads and answers. plugin:demo has seven registry plugins each do what they are for, and its description says what each does, what it installs and what it leaves in the site. What the description does not say:
- What each plugin is set up with is written in code, a recipe per plugin in
scripts/core/plugin-demo.mjs: the form’s fields, the post, its French words. It is not a file you edit. - It refuses
--live: this machine’s built site only. - To draw Contact Forms’ form on a page, a site needs more than the plugin’s package in its config: a
src/middleware.tsas this repo’ssite/has (Upstream issues).
Your own, or one from npm
mise run plugin:new -- save-log # scaffold, test, build, add to the site
mise run plugin:check -- save-log # manifest, types, tests, build, bundle
mise run plugin:add -- @emdash-cms/plugin-forms # a package from npm
mise run plugin -- --help # anything else in EmDash's plugin CLI
plugin:new needs PLUGIN_PUBLISHER, PLUGIN_AUTHOR and PLUGIN_SECURITY_EMAIL (Settings). plugin:new and plugin:add stop the site while its packages change; one that was running before the task is started again when it ends.
What the tasks write in astro.config.mjs, and what they leave to you:
| Plugin | In astro.config.mjs | Who writes it |
|---|---|---|
Sandboxed: made by plugin:new, or a package built with emdash-plugin build | import saveLog from "save-log"; and sandboxed: [saveLog] in emdash({ … }) | The task |
Native: a package that runs in the site itself, such as @emdash-cms/plugin-forms | import { formsPlugin } from "@emdash-cms/plugin-forms"; and plugins: [formsPlugin()] | You. plugin:add adds the package, prints the two lines and ends there, as a failure: which export makes the plugin is for its README to say |
The tasks edit only the top level of the one emdash({ … }) call, and change nothing that is already there. A config where that call is not written out (its options in a variable, a spread among them, two calls) is left as it is, and the task prints the lines to add by hand.
Coywolf Pack: a faster, cheaper Cloudflare site
mise run plugin:coywolf # the pack, wired into the site
mise run live:ship # its page cache only works once deployed
mise run live:zone # the zone's settings, once the site has a domain of its own
Coywolf Pack (@coywolf/emdash) is one native plugin with the features of Coywolf’s WordPress plugins. Coywolf runs seven EmDash sites on it for Workers Paid’s $5 a month (their write-up, read 2026-11-07). What makes that cheap is its page cache: a page is kept in the cache in front of the Worker for a week, so a visit to it runs no Worker and reads no D1; a deploy or an edit clears what changed, and warming visits the site’s pages again after a clear, so a reader or a crawler is not the one who waits.
It needs more than the two lines plugin:add prints for a native plugin, so it has a task of its own. What plugin:coywolf writes:
| File | What | Why |
|---|---|---|
package.json | @coywolf/emdash from the release’s tarball (COYWOLF_VERSION), and the peers it names that the site lacks | It is not on npm. Its README asks for the tarball: a github: install is recorded as an SSH address, which a CI runner cannot fetch |
astro.config.mjs | coywolfPlugin() in plugins: [ … ] of emdash({ … }); vite.optimizeDeps | A pre-bundled copy gets its own emdash |
astro.config.mjs | cache: { provider: cacheCloudflare() } and route rules for every page, when the site has no cache: | The page cache is Astro’s route cache, in front of the Worker. A site that has its own cache: keeps it, and its own lifetimes |
src/middleware.ts | coywolfPack() first, the site’s own after it; the file, when there is none | Redirects, robots.txt, downloads, and the cache’s clears and warming are answered there |
wrangler.jsonc | CF_VERSION_METADATA, SELF (a service binding to the Worker itself), Smart Placement, Workers Logs | A deploy clears the cache; warming calls the Worker; the Worker runs near its database; the usage card reads the logs |
Every module of the pack starts off: nothing a visitor sees changes until an administrator turns it on, under Plugins → Coywolf Pack → Features. The page cache’s lifetimes and warming are under Plugins → Performance.
live:zone is the other half of the write-up: Smart Tiered Cache and Early Hints for the zone, and two custom rules for the site’s host only — a Managed Challenge to unverified bots that say they are Chrome before 140 or iOS 15 and earlier (Coywolf found scrapers were its largest CPU cost), and a block of WordPress probes. It is written for the Free plan, which has no regular expressions in rules, and needs an API token that may change the zone (Deploy).
Limits
- On Cloudflare, deploying a site with the sandbox on needs the Workers Paid plan.
plugin:workssays a plugin loads and answers: it shows a route that wants a POST only as existing, and does not fire hooks.- A plugin runs with the permissions you agree to at install. Hold a plugin to a release with
@<version>, because a newer one may ask for more. plugin:updatehas been run only between releases that ask for the same: on 2026-10-08 no plugin in the registry had a release that asks for more than the one before it. So its stop without--yes, and the site’s own refusal, have not been run. What is tested, on made-up releases, is how it works out that a release asks for more (tests/plugin/plugin-permissions.test.mjs).- On a Node site,
plugin:install,plugin:updateandplugin:removerestart the built site (Upstream issues). plugin:publishasks first, and needs a registry login of your own.