Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ryzhpolsos/redeye/llms.txt

Use this file to discover all available pages before exploring further.

Plugins let you extend RedEye with C# code that is compiled at startup and integrated directly into the shell. Each plugin can register new widget types that you reference in RWML layout files, and custom expression functions you can call from attribute values and event handlers. Because plugins are compiled from source on every launch, you iterate by editing .cs files and restarting — no build system required.

Plugin directory structure

RedEye discovers plugins by scanning the plugins/ directory inside your RedEye application folder. Each subdirectory is treated as one plugin. The directory name is used as the plugin’s identifier.
<app-directory>/
└── plugins/
    └── my-plugin/
        ├── plugin.json
        ├── MyPlugin.cs
        └── SomeHelper.cs
Every plugin directory must contain a plugin.json manifest and one or more .cs source files. All .cs files in the directory are compiled together as a single assembly.

The plugin.json manifest

plugin.json describes the plugin to the loader and controls dependency resolution and extra assembly references.
{
  "id": "my-plugin",
  "name": "My Plugin",
  "requiredAssemblies": [
    "System.Net.Http"
  ],
  "dependencies": [
    "another-plugin"
  ]
}
id
string
required
Unique identifier for the plugin. Used as the namespace prefix for all exported widgets and functions: <id.widgetName> and id.functionName().
name
string
required
Human-readable display name. Appears in logs during plugin loading.
requiredAssemblies
string[]
Extra .NET assemblies to load before compiling this plugin. Specify assembly names as you would pass to Assembly.Load() (e.g. "System.Net.Http").
dependencies
string[]
IDs of other plugins that must be loaded before this one. RedEye reorders the load sequence automatically to satisfy dependencies. If a listed dependency is not present, loading halts with a fatal error.

How plugins are loaded

At startup, after the component system initialises, PluginManager.LoadPlugins() runs the following sequence for each plugin:
  1. Reads and parses plugin.json.
  2. Reorders plugins so that all dependencies are satisfied (plugins are moved to the end of the queue if their dependencies have not yet loaded).
  3. Calls Assembly.Load() for each entry in requiredAssemblies.
  4. Reads every .cs file in the plugin directory and compiles them together using the script engine.
  5. Scans the compiled assembly for classes that subclass Plugin, creates an instance, calls InitPlugin() to inject services, then calls Main().
If compilation fails, RedEye logs every C# compiler error and halts the entire plugin loading process. Fix the error and restart.

What plugins can do

Export widgets

Register custom WinForms controls as RWML widget types. Users reference them in layout files as <pluginId.widgetName />.

Export functions

Add expression functions callable from any RWML attribute value or event handler as pluginId.functionName(arg1, arg2).

Next steps

Creating a plugin

Step-by-step guide to writing your first plugin.

Plugin API reference

All properties and methods available on the Plugin base class.

Build docs developers (and LLMs) love