Manifest reference
The plugin manifest defines the metadata required to load and present your plugin. The manifest file should be named plugin.json or plugin.yaml and placed in the top of your plugin bundle.
Example plugin.json:
{
"id": "com.mycompany.myplugin",
"name": "My Plugin",
"description": "This is my plugin",
"homepage_url": "https://example.com",
"support_url": "https://example.com/support",
"release_notes_url": "https://example.com/releases/v0.0.1",
"icon_path": "assets/logo.svg",
"version": "0.1.0",
"min_server_version": "5.6.0",
"server": {
"executables": {
"linux-amd64": "server/dist/plugin-linux-amd64",
"darwin-amd64": "server/dist/plugin-darwin-amd64",
"windows-amd64": "server/dist/plugin-windows-amd64.exe"
}
},
"webapp": {
"bundle_path": "webapp/dist/main.js"
},
"settings_schema": {
"header": "Some header text",
"footer": "Some footer text",
"settings": [{
"key": "someKey",
"display_name": "Enable Extra Feature",
"type": "bool",
"help_text": "When true, an extra feature will be enabled!",
"default": "false"
}]
},
"props": {
"someKey": "someData"
}
}
Table of contents
id- Stringname- Stringdescription- Stringhomepage_url- Stringsupport_url- Stringrelease_notes_url- Stringicon_path- Stringversion- Stringmin_server_version- Stringserver- Objectexecutables- Dictexecutable- String
webapp- Objectbundle_path- String
settings_schema- Objectheader- Stringfooter- Stringsettings- Arraykey- Stringdisplay_name- Stringtype- Stringhelp_text- Stringregenerate_help_text- Stringplaceholder- Stringdefault- Interfaceoptions- Arraydisplay_name- Stringvalue- String
hosting- Stringsecret- Bool
sections- Arraykey- Stringtitle- Stringsubtitle- Stringsettings- Arraykey- Stringdisplay_name- Stringtype- Stringhelp_text- Stringregenerate_help_text- Stringplaceholder- Stringdefault- Interfaceoptions- Arraydisplay_name- Stringvalue- String
hosting- Stringsecret- Bool
header- Stringfooter- Stringcustom- Boolfallback- Bool
props- Dict
Documentation
id- StringThe id is a globally unique identifier that represents your plugin. Ids must be at least 3 characters, at most 190 characters and must match ^[a-zA-Z0-9-_\.]+$. Reverse-DNS notation using a name you control is a good option, e.g. "com.mycompany.myplugin".
name- StringThe name to be displayed for the plugin.
description- StringA description of what your plugin is and does.
homepage_url- StringHomepageURL is an optional link to learn more about the plugin.
support_url- StringSupportURL is an optional URL where plugin issues can be reported.
release_notes_url- StringReleaseNotesURL is an optional URL where a changelog for the release can be found.
icon_path- StringA relative file path in the bundle that points to the plugins svg icon for use with the Plugin Marketplace. This should be relative to the root of your bundle and the location of the manifest file. Bitmap image formats are not supported.
version- StringA version number for your plugin. Semantic versioning is recommended: http://semver.org
min_server_version- StringThe minimum Mattermost server version required for your plugin.
Minimum server version: 5.6
server- ObjectServer defines the server-side portion of your plugin.
executables- DictExecutables are the paths to your executable binaries, specifying multiple entry points for different platforms when bundled together in a single plugin.
executable- StringExecutable is the path to your executable binary. This should be relative to the root of your bundle and the location of the manifest file.
On Windows, this file must have a ".exe" extension.
If your plugin is compiled for multiple platforms, consider bundling them together and using the Executables field instead.
webapp- ObjectIf your plugin extends the web app, you'll need to define webapp.
bundle_path- StringThe path to your webapp bundle. This should be relative to the root of your bundle and the location of the manifest file.
settings_schema- ObjectTo allow administrators to configure your plugin via the Mattermost system console, you can provide your settings schema.
header- StringOptional text to display above the settings. Supports Markdown formatting.
settings- ArrayA list of setting definitions.
key- StringThe key that the setting will be assigned to in the configuration file.
display_name- StringThe display name for the setting.
type- StringThe type of the setting.
"bool" will result in a boolean true or false setting.
"dropdown" will result in a string setting that allows the user to select from a list of pre-defined options.
"generated" will result in a string setting that is set to a random, cryptographically secure string.
"radio" will result in a string setting that allows the user to select from a short selection of pre-defined options.
"text" will result in a string setting that can be typed in manually.
"longtext" will result in a multi line string that can be typed in manually.
"number" will result in integer setting that can be typed in manually.
"username" will result in a text setting that will autocomplete to a username.
"custom" will result in a custom defined setting and will load the custom component registered for the Web App System Console.
help_text- StringThe help text to display to the user. Supports Markdown formatting.
regenerate_help_text- StringThe help text to display alongside the "Regenerate" button for settings of the "generated" type.
placeholder- StringThe placeholder to display for "generated", "text", "longtext", "number" and "username" types when blank.
default- InterfaceThe default value of the setting.
options- ArrayFor "radio" or "dropdown" settings, this is the list of pre-defined options that the user can choose from.
display_name- StringThe display name for the option.
value- StringThe string value for the option.
hosting- StringThe intended hosting environment for this plugin setting. Can be "cloud" or "on-prem". When this field is set, and the opposite environment is running the plugin, the setting will be hidden in the admin console UI. Note that this functionality is entirely client-side, so the plugin needs to handle the case of invalid submissions.
secret- BoolIf true, the setting is sanitized before showing it in the System Console or returning it via the API. This is useful for settings that contain sensitive information.
sections- ArrayA list of settings section definitions.
key- StringA unique identifier for this section.
title- StringOptional text to display as section title.
subtitle- StringOptional text to display as section subtitle.
settings- ArrayA list of setting definitions to display inside the section.
key- StringThe key that the setting will be assigned to in the configuration file.
display_name- StringThe display name for the setting.
type- StringThe type of the setting.
"bool" will result in a boolean true or false setting.
"dropdown" will result in a string setting that allows the user to select from a list of pre-defined options.
"generated" will result in a string setting that is set to a random, cryptographically secure string.
"radio" will result in a string setting that allows the user to select from a short selection of pre-defined options.
"text" will result in a string setting that can be typed in manually.
"longtext" will result in a multi line string that can be typed in manually.
"number" will result in integer setting that can be typed in manually.
"username" will result in a text setting that will autocomplete to a username.
"custom" will result in a custom defined setting and will load the custom component registered for the Web App System Console.
help_text- StringThe help text to display to the user. Supports Markdown formatting.
regenerate_help_text- StringThe help text to display alongside the "Regenerate" button for settings of the "generated" type.
placeholder- StringThe placeholder to display for "generated", "text", "longtext", "number" and "username" types when blank.
default- InterfaceThe default value of the setting.
options- ArrayFor "radio" or "dropdown" settings, this is the list of pre-defined options that the user can choose from.
display_name- StringThe display name for the option.
value- StringThe string value for the option.
hosting- StringThe intended hosting environment for this plugin setting. Can be "cloud" or "on-prem". When this field is set, and the opposite environment is running the plugin, the setting will be hidden in the admin console UI. Note that this functionality is entirely client-side, so the plugin needs to handle the case of invalid submissions.
secret- BoolIf true, the setting is sanitized before showing it in the System Console or returning it via the API. This is useful for settings that contain sensitive information.
header- StringOptional text to display above the settings. Supports Markdown formatting.
custom- BoolIf true, the section will load the custom component registered using `registry.registerAdminConsoleCustomSection`
fallback- BoolIf true and Custom = true, the settings defined under this section will still render as fallback (unless the individual setting is type 'custom') when the plugin is disabled.
props- DictPlugins can store any kind of data in Props to allow other plugins to use it.