-
-
Notifications
You must be signed in to change notification settings - Fork 37
Home
This wiki is intended to be a resource for creating custom plugins and themes for Stremio Enhanced. If you are familiar with modding tools like BetterDiscord or Vencord, creating themes and plugins for Stremio Enhanced is very similar.
Writing for Stremio Enhanced is straightforward: Themes use standard CSS to override the default UI, and Plugins use standard JavaScript to manipulate the DOM and interact with custom APIs.
- Table of Contents
- Getting Started: The Metadata
- Creating Themes
- Creating Plugins
- Submitting & Update Safety
Every theme and plugin requires a metadata block at the very top of the file. This tells Stremio Enhanced what your add-on is, who made it, and where to look for updates.
Themes must end with .theme.css and Plugins must end with .plugin.js.
Here is exactly how your metadata block should look:
/**
* @name ExamplePluginName
* @description Example plugin description here
* @updateUrl https://raw.githubusercontent.com/YourName/ExamplePlugin/main/ExamplePlugin.plugin.js
* @version 1.0.0
* @author YourName
*/You must have this at the start of your file. The updateUrl is particularly important. It should be a raw link to your file in a GitHub repository. Stremio Enhanced will periodically fetch this link to check if the version number in the metadata is higher than the user's installed version. If it is, the client will automatically give the user a button to update!
However, if you wish to not provide an updateUrl, you can just not put it or put it but instead of a link, enter none.
To start making a theme, open Stremio Enhanced and press Ctrl+Shift+I to open the Developer Tools. You can use the element inspector to find the exact class names of the UI components you want to modify.

Once you have your classes, simply write your CSS to override the default styles. Here is a simple example of an AMOLED theme:
/**
* @name Amoled Theme
* @description A theme that uses amoled pitch black color.
* @updateUrl https://raw.githubusercontent.com/REVENGE977/StremioAmoledTheme/main/amoled.theme.css
* @version 1.0.3
* @author REVENGE977
*/
:root {
--primary-background-color: black;
--secondary-background-color: black;
--modal-background-color: black;
}
.poster-image-NiV7O:hover {
cursor: pointer;
}Sometimes a theme relies on a specific plugin to look correct or function properly. You can now enforce this by adding a @requirements tag to your metadata! If a user installs your theme without the required plugin, Stremio Enhanced will let them know.
* @author REVENGE977
* @requirements ["pluginName.plugin.js"]
*/You can pass multiple plugins since it's an array.
Plugins are just regular JavaScript injected into the application. You have full access to the DOM to create custom elements, observe changes, and add new functionality.
You don't need to build your own custom UI just to let users toggle your plugin's features. Stremio Enhanced provides a native Settings API.
You can register custom settings directly into the Stremio settings panel, get/set their current values, and attach event listeners so your plugin reacts instantly when a user changes settings.
To register settings for your plugin, you can use the registerSettings method (better put at the start of your plugin file after the metadata).
await StremioEnhancedAPI.registerSettings([
{
key: "search_hotkey",
type: "input",
label: "Search Hotkey",
description: "The keyboard key used to immediately open and focus the search bar.",
defaultValue: "/"
},
{
key: "focus_delay",
type: "input",
label: "Focus Delay (ms)",
description: "Adding a slight delay can prevent stuttering on older hardware when opening search.",
defaultValue: "0"
},
{
key: "default_category",
type: "select",
label: "Default Search Category",
description: "Choose which category the search should filter by when using the hotkey.",
defaultValue: "global",
options: [
{ label: "Global (Everything)", value: "global" },
{ label: "My Library Only", value: "library" },
{ label: "Movies Only", value: "movies" },
{ label: "Series Only", value: "series" }
]
},
{
key: "auto_clear",
type: "toggle",
label: "Auto-Clear Search",
defaultValue: true
}
]);result:

You can then get those settings at any time you want or you can also listen to whenever the settings change:
// Get current value
const hotkey = await StremioEnhancedAPI.getSetting("search_hotkey");
// Listening for changes when the user changes something in the settings
StremioEnhancedAPI.onSettingChange("auto_clear", (newValue) => {
console.log(`Auto-clear is now set to: ${newValue}`);
});You can set the value of the settings from your plugin as well whether it be hidden settings that you didn't register using registerSettings or one of the settings you did register:
const hotkey = await StremioEnhancedAPI.saveSetting("search_hotkey", "=");You can use showAlert function to show an alert and you can get the result of which button the user clicked.
await StremioEnhancedAPI.showAlert(
"info",
"Feature A",
"Do you want to enable feature A?",
["Yes", "No"]
);This will return 0 for Yes and 1 for No.
You can also send prompts to the user:
await StremioEnhancedAPI.showPrompt(
"Title",
"Message",
"Default value here"
);It will return whatever the user entered. If the user clicks cancel, it will return null.
You can use the same logger Stremio Enhanced uses (winston) to log in the console instead of using console.log(). It gives information on what plugin is doing the logging as well as the type (info, warn, error). Here is an example:
StremioEnhancedAPI.logger.info("slash pressed, focusing searchbar.");
Stremio Enhanced features an update system for both the core client and community plugins/themes.
You can submit your plugin to the community marketplace where users can see and download your work directly from the client. Here is the registry repository where you can submit your work: strmeio-enhanced-registry.
One important thing to note: if you're submitting a plugin, you will need to create a pull request to have the community marketplace present your new version. This is for security reasons so people can't submit safe content then push an update with unsafe content. For themes, one submission is enough.
If your plugin isn't in the community marketplace or if the new version isn't available in the community marketplace, users can still update your plugin directly from the client, however a dialog will show up informing them that the new version of your plugin isn't submitted yet to the community marketplace and advice them to read the source code first before updating. The user can either go back and not update or proceed and update. Here is how the dialog looks:
