Plugin Configuration
All plugins must include a mobro_plugin_config.json file, which defines essential metadata for proper functionality.
This configuration file must be placed in the root directory of the plugin when publishing it as a .zip file.
If this file is missing, the plugin is considered invalid and cannot be installed in MoBro.
Fields
The following table describes the fields of the mobro_plugin_config.json file:
| Field | Default | Restrictions | Description |
|---|---|---|---|
| name | - | Required Length: 3 - 32Pattern: ^[\w-]+$ | The globally unique identifier of the plugin. Not shown to users, see displayName. |
| displayName | name | Max length: 32 | The human-readable name of the plugin shown to users. |
| author | Unknown | Max length: 32 | The author's name. |
| description | - | Max length: 512 | A short textual description of the plugin. |
| assembly | Plugin.dll | Max length: 128 | The published .dll file to load. |
| localization | - | Max length: 128 | The relative path to the folder containing localization files. |
| executionMode | AdminBackground | UserSession or AdminBackground | Determines the context in which the plugin process runs. |
| repository | - | Max length: 128 | The optional URL of the plugin's source code repository. |
| homepage | - | Max length: 128 | The optional URL of the plugin's homepage. |
| tags | [] | Max. 10 tagsMax length: 32 per tag | Optional list of tags used when published to the marketplace. |
| settings | [] | - | The plugin's settings fields. |
| dependencies | [] | Max. 10 dependencies | The plugin's external dependencies. |
The version of a plugin is not defined in this file. It is taken from the plugin's project, e.g. the <VersionPrefix>
in the .csproj file.
executionMode Field
The execution mode determines how and in which context MoBro starts the plugin's process:
AdminBackground (default) | UserSession | |
|---|---|---|
| Started by | The MoBro background service | The MoBro application, within the session of the logged-in user |
| Privileges | Administrative | Those of the logged-in user |
| Runs while MoBro is not open | Yes, depending on the 'Background Monitoring' setting in MoBro | No |
| Access to the user session | No | Yes |
| Typical use cases | Hardware sensors, system information, external APIs | Media playback, controlling desktop applications |
Use the default AdminBackground mode unless the plugin needs access to the user session, e.g. because its metrics or
actions interact with applications running on the user's desktop. Due to Windows permission restrictions, plugins
running in AdminBackground mode can't access the user session.
dependencies Field
The dependencies field lets the plugin define external requirements, such as a third-party program that must be
installed or running.
| Field | Type | Restrictions | Description |
|---|---|---|---|
| name | string | Required Length: 1 - 64Pattern: ^[\w-]+$ | Unique identifier of the dependency. |
| label | string | Required Length: 1 - 128 | Human-readable name of the dependency. |
| description | string | Max length: 256 | A short textual description of the dependency. |
| link | string | Max length: 256 | A URL to the dependency's homepage or download site. |
| version | string | Max length: 16 | The specific version of the dependency required. |
| required | boolean | Default: false | Whether the plugin requires this dependency to work properly. See Required Dependencies. |
{
"name": "example_aida64",
"displayName": "AIDA64 Example",
"assembly": "Plugin.Example.dll",
"dependencies": [
{
"name": "aida64",
"label": "AIDA64",
"description": "AIDA64 must be running with shared memory enabled",
"link": "https://www.aida64.com",
"required": true
}
]
}
At runtime, the plugin reports the current status of each dependency
using IMoBroService.SetDependencyStatus.
Required Dependencies
Marking a dependency as required does not prevent the plugin from being started. MoBro starts the plugin as
usual, but shows it as dependencies missing until the plugin reports the status DependencyStatus.Ok for every
required dependency. While the plugin is in this state, its actions can't be invoked.
A plugin declaring a required dependency must report its status, e.g. in Init() and whenever the status changes.
Otherwise MoBro never considers the dependency available.
Example Configuration
Below is an example of a mobro_plugin_config.json file from
the MoBroHardwareMonitor plugin.
This configuration demonstrates how to define the required fields, such as a unique plugin name, a custom assembly name,
and the localization directory.
Settings have been omitted for brevity; refer to In-depth: Settings for more details.
{
"name": "modbros_mobrohardwaremonitor",
"displayName": "MoBro Hardware Monitor",
"author": "ModBros",
"description": "A basic hardware monitoring plugin covering the most basic metrics",
"assembly": "Plugin.MoBroHardwareMonitor.dll",
"localization": "Resources/Localization",
"repository": "https://github.com/ModBros/mobro-plugin-mobrohardwaremonitor",
"homepage": null,
"tags": [
"hardware", "system"
],
"settings": []
}