> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lynxhub.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Publishing extensions

> Publish extensions to the LynxHub plugin repository.

To share your extension with the community and make it installable directly within LynxHub, you must submit it to the official LynxHub plugin registry.

Before publishing, ensure you complete local verification and configure your repository branches correctly.

***

## Prerequisites

Before submitting your extension for publication, you must verify that all features work as expected.

1. **Read testing guidelines**: Familiarize yourself with the static validation and local testing flows in the [Testing extensions](/plugins/extensions/test) guide.
2. **Read building guidelines**: Learn how to compile and structure the compiled files in the [Building extensions](/plugins/extensions/build) guide.
3. **Verify locally**: Install the compiled production build of your extension into your local `Plugins/` folder. Ensure it boots and runs correctly without any runtime errors.

***

## Set up the compiled branch (`main`)

The registry crawler accesses the `main` branch to retrieve the compiled production assets. You must keep this branch clean of raw source code.

1. Create a branch named `main` in your repository.
2. Copy the compiled `scripts/` directory to the root of the `main` branch.
3. Commit and push the compiled files to the `main` branch.

***

## Set up the `metadata` branch

The LynxHub registry crawler scans extension repositories to fetch versioning and compatibility data. You must expose this metadata on a dedicated branch.

1. Create a branch named `metadata` in your extension repository.
2. Add the required `metadata.json` and `versioning.json` configuration files to the root of the branch.
3. Ensure the structure of these files matches the specifications in the [Extension configuration](/plugins/extensions/configuration) guide.
4. Ensure the `commit` hashes specified in `versioning.json` match the release commits on your `main` branch.

***

## Register your extension repository

To register your extension in the global repository list, add it to the statics registry:

1. Visit the [LynxHub Statics repository](https://github.com/KindaBrazy/LynxHub-Statics).
2. Fork the repository.
3. Switch to the `source` branch in your fork.
4. Open the `plugins.json` file located at the root of the project.
5. Append your extension's repository base URL to the JSON array. For example:
   ```json theme={null}
   [
     "https://github.com/KindaBrazy/LynxHub-Module-Offline-Container",
     "https://github.com/KindaBrazy/LynxHub-Python-Toolkit",
     "https://github.com/KindaBrazy/LynxHub-Hardware-Monitor",
     "https://github.com/KindaBrazy/LynxHub-Custom-Actions",
     "https://github.com/your-username/your-extension-repo"
   ]
   ```
6. Commit the change and push to your fork.
7. Open a **Pull Request** targeting the `source` branch of `KindaBrazy/LynxHub-Statics`.

Once the Pull Request is reviewed and merged, LynxHub's automated workflows will crawl your `metadata` branch, pull the release information, and register the extension in the application database.
