Docs

Creating Your First Extension

Once you've set up your project from a template, the next step is to register your extension and configure it. The process differs slightly depending on whether you want to create a public or a private extension.

Registering Your Extension

All extensions, whether public or private, must be registered on the Sliprail Developer Portal to obtain a unique Extension ID.

  1. Visit the Developer Portal: Go to https​://account.fengcen.io/developer.
  2. Create a New Extension: Click the button to create a new extension.

Creating a Public Extension

If you want your extension to be installable and usable by anyone:

  • Fill in the Details: In the registration form, provide your extension's name, description, and set the visibility to "Public".
  • Provide GitHub Repository URL: You must fill in the link to your public GitHub repository.
  • Get the Extension ID: After registration, you will be given an Extension ID. This is the unique identifier for your extension.

Creating a Private Extension

If you're creating an extension for your personal use only:

  • Fill in the Details: In the registration form, select "Private" for the visibility option.
  • GitHub Repository URL: You do not need to provide a GitHub repository link.
  • Get the Extension ID: You will still receive an Extension ID after registration.

Configure manifest.json

The manifest.json file is your extension's identity card; it contains metadata about your extension. The most critical field is the id.

  • Set the Extension ID: In your manifest.json file, find the id field and set its value to the Extension ID you obtained from the Developer Portal.
{
  "id": "your-unique-extension-id",
  "main": "main.js",
  ...
}

This step is crucial for Sliprail to correctly identify and load your extension. With this done, you are ready to start writing the core logic of your extension.