Skip to main content

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.

note

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:

FieldDefaultRestrictionsDescription
name-Required
Length: 3 - 32
Pattern: ^[\w-]+$
The globally unique identifier of the plugin. Not shown to users, see displayName.
displayNamenameMax length: 32The human-readable name of the plugin shown to users.
authorUnknownMax length: 32The author's name.
description-Max length: 512A short textual description of the plugin.
assemblyPlugin.dllMax length: 128The published .dll file to load.
localization-Max length: 128The relative path to the folder containing localization files.
executionModeAdminBackgroundUserSession or AdminBackgroundDetermines the context in which the plugin process runs.
repository-Max length: 128The optional URL of the plugin's source code repository.
homepage-Max length: 128The optional URL of the plugin's homepage.
tags[]Max. 10 tags
Max length: 32 per tag
Optional list of tags used when published to the marketplace.
settings[]-The plugin's settings fields.
dependencies[]Max. 10 dependenciesThe plugin's external dependencies.
Plugin Version

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 byThe MoBro background serviceThe MoBro application, within the session of the logged-in user
PrivilegesAdministrativeThose of the logged-in user
Runs while MoBro is not openYes, depending on the 'Background Monitoring' setting in MoBroNo
Access to the user sessionNoYes
Typical use casesHardware sensors, system information, external APIsMedia 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.

FieldTypeRestrictionsDescription
namestringRequired
Length: 1 - 64
Pattern: ^[\w-]+$
Unique identifier of the dependency.
labelstringRequired
Length: 1 - 128
Human-readable name of the dependency.
descriptionstringMax length: 256A short textual description of the dependency.
linkstringMax length: 256A URL to the dependency's homepage or download site.
versionstringMax length: 16The specific version of the dependency required.
requiredbooleanDefault: falseWhether the plugin requires this dependency to work properly. See Required Dependencies.
mobro_plugin_config.json
{
"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.

caution

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.

Plugin.MoBroHardwareMonitor/mobro_plugin_config.json
{
"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": []
}