Plugins are shared as npm packages. Once yours is on npm, anyone can add it by name. The plugin market lists published plugins in the app’s Discover tab.

Name it after your scope

The npm package is @publisher/name, and its scope must be the plugin’s publisher. For the plugin yourname/level-ideas, publish @yourname/level-ideas. The name @yourname/ohmygame-plugin-level-ideas works too. OhMyGame refuses a package whose scope doesn’t match. The publishers ohmygame and personal are reserved.

In package.json:

  • files lists what to publish: .ohmygame-plugin, assets, locales and the folders your parts use.
  • keywords includes ohmygame-plugin.
  • publishConfig.access is public.

Release a version

  1. Raise version in both package.json and .ohmygame-plugin/plugin.json. Each release needs a new version.
  2. Check what npm would publish. From a clone of the OhMyGame repository, run bun run plugin:check path/to/your-plugin.
  3. Publish to npm.

A plugin exported from the Plugin Builder includes a GitHub Actions workflow that publishes a GitHub release with provenance. To use it, add repository to package.json, then set your repository up as a trusted publisher of the package on npmjs.com. Add a license before you publish.

The plugin market

The market lists plugins published on npm. A job finds them, runs the same package checks as the app, and publishes an index that the app reads.

  • Source verified means npm’s provenance names the plugin’s repository, or the repository’s package.json names the package. Publishing with provenance is the easiest way to get it.
  • Installing from the market opens the same review as Add plugin…. It checks npm’s signature over the package’s name, version and checksum.
  • When you publish a new version, people who added your plugin from npm see Update available.

Before you publish

  • Translate locales/zh-CN.json. Until you do, it repeats locales/en.json.
  • Ask only for the capabilities you need. Everything a plugin asks for is shown to people before they allow it.
  • If the plugin has native code, say what it does in longDescription. People approve native code knowing it isn’t sandboxed.