Green Tea. plugins

Write it once. It mounts in any green-tea app.

A plugin is a name and a mount function. It adds providers and steps to the graph, and green-tea figures out where they run. Publish it to JSR or npm, list it here, and it gets a page of its own.

Add your pluginBrowse plugins

Needs @green-tea/core@26.9.0-beta.2 or newer. Each card shows which runtimes that plugin supports.

greeting.ts
import type { Plugin } from '@green-tea/core';

export function greeting(text = 'hello'): Plugin {
  return {
    name: 'greeting',
    mount({ scope }) {
      scope.add({
        kind: 'provider',
        name: 'greeting',
        needs: [],
        provides: ['greeting'],
        run: () => ({ greeting: text }),
      });
    },
  };
}

The idea

What's a plugin, and why write one?

One object

{ name, mount }. No base class to extend and no lifecycle to learn. mount gets bus.on, scope.add and onShutdown, and that is the whole API.

Core as types only

Plugins import @green-tea/core with import type and keep it out of dependencies, and review checks for it. So installing one does not pull in a second copy of core.

The graph picks the order

Say what your plugin needs and what it provides, and green-tea works out where it runs.

The listing

Official plugins, and room for yours

Three to start. The version and runtimes on each card come straight from the registry.

Why here

Why list it here

A page of its own
Your README, every published version and an install command people can copy.
Runtimes read, not typed
Each card shows where your plugin runs, taken from what the package declares.
It doesn't go stale
Your entry has no version in it. Each rebuild of the listing asks the registry again, so your card picks up a new release without you touching the entry.
Read by a person
Someone who works on green-tea reads each entry before it is listed.

How it works

Three steps

  1. Publish

    Put it on JSR, or on npm as an ESM-only package.

    matcha create plugin --package scaffolds one.

  2. Add one file

    Open a pull request that adds one yaml file.

    jsr: "@your-scope/green-tea-your-plugin"
    repo: https://github.com/you/green-tea-your-plugin
    description: "One sentence, 20 to 200 characters."
  3. Go live

    Once it merges, it is out on the next Friday cut.

The listing is new. The first plugins get the front row.

Every plugin here today is one of ours. The first community entries are the ones people will see first.

Add your pluginRead CONTRIBUTING.md