Skip to main content

Overview

The plugin schematic writes a new editor plugin project, in a folder of its own. It is not part of a game: you build it, then load it in the editor. nf create plugin runs it. It has two templates:
  • panel (the default): a Svelte panel, a command in the Edit menu, and a setting. The panel is a counter, to show each piece of the plugin API.
  • theme: a color theme and an icon, with no code. Everything is in nanoforge.manifest.json.
The editor plugin documentation covers the manifest, the SDK and the themes.

Usage

Options

Generated files

With template: "panel":
The editor SDK packages (@nanoforge-dev/editor-sdk, @nanoforge-dev/editor-vite-plugin) are pinned to the newest 1.x release published at least 48 hours before generation. With template: "theme":
The theme extends the editor’s dark theme and changes only a few colors. Its keywords: ["theme"] lists it among the themes of the editor’s marketplace once published.

Run it in the editor

Build the plugin into dist/ on every change, then start the editor with DEV_PLUGINS pointing at the plugin folder:
For a theme, run node build.mjs --watch instead of pnpm dev, then choose the theme in Settings › Editor › Appearance. No published editor reads DEV_PLUGINS yet (the latest release is 0.1.4): this loop needs a newer editor release.

Examples

A panel plugin:
A theme in a custom folder: