Stremio add-ons guide

Stremio add-ons guide

  • Home
  • SDK
  • Guide

›Add-on SDK Guide

Add-on SDK Guide

  • Prelude
  • 1. Get started
  • 2. Adding catalogs
  • 3. Meta
  • 4. Streams
  • 5. Deploying

Generic Add-on Guide

  • The basics
  • 1. The add-on manifest
  • 2. Testing the add-on
  • 3. The catalog
  • 4. Simple meta
  • 5. Providing streams
  • 6. Multiple videos
  • 7. Dynamic content
  • 8. Deploying

1. Get started

To initialize your first add-on, we will use the addon-bootstrap utility which is provided by stremio-addon-sdk.

The addon-bootstrap utility will ask you a few questions about your add-on name, description and what it will provide. Don't worry - you can always change this later!

Deciding what your add-on will do

If you only intend to provide catalogs (content in Board/Discover), then you only need the catalog resource. Similarly, if you only want to provide streams, just select the stream resource.

For more details, read the Resources explanation and Content types.

Initialize the add-on

npm install --global stremio-addon-sdk # requires "sudo" if you're on Linux
addon-bootstrap hello-world

Now, you will be asked various things about your add-on, such as name, description, resources it provides and types of content it will have.

After you've completed the steps, do:

cd hello-world
npm install
npm start -- --launch

Congratulations! You've created your first Stremio add-on. After the last step, the web version of Stremio will be opened in your browser with the add-on pre-installed!

Structure

The initialized add-on will have the following structure:

  • addon.js: this is the JS module that exports the addonInterface, which is a generic interface to your add-on; it will end in module.exports = builder.getInterface()
  • server.js: this is the executable JS file that will start an HTTP server and optionally launch/install your add-on if you pass --launch or --install

This pattern is useful and encouraged because it allows your add-on to be used locally by only requiring addon.js

← Prelude2. Adding catalogs →
  • Deciding what your add-on will do
  • Initialize the add-on
  • Structure
Stremio add-ons guide
Docs
GuideAPI Reference
Community
RedditFacebookTwitter
More
Official WebsiteBlogGitHub
Copyright © 2023 Stremio