Clone the starter template
To start developing quickly, first clone the host LynxHub application repository and navigate to its root folder. Then, clone thesource branch of the official LynxHub Module Template directly into the module folder:
src/Utils/ folder, you will find starter utilities for process checks, Python/environment discovery, NPM package installation, and renderer installation/updating steppers.
Define package configuration
Open thepackage.json file at the root of your module folder and customize your card module’s name, author information, and repository links.
Card module metadata (
metadata.json) and release version history (versioning.json) must be placed in a dedicated metadata branch of your repository. They are not
stored in the source branch. For more details, see the Module configuration and Publishing modules
guides.Implement the main process
Open thesrc/main.ts file. This file registers the backend lifecycle methods of your module. The template uses a helper module Comfy_MM to specify commands and checks.
Implement the renderer process
Open thesrc/renderer.ts file. This file defines the metadata, settings, arguments, and installation wizards for the user interface.
Run and test locally
Start the LynxHub host application in development mode:/module directory and imports your card definitions. In this template, the ComfyUI card is registered under the Image Generation category.
- Locate the ComfyUI card on the dashboard.
- Click the launch button to test execution.
- A terminal tab will boot up automatically and run your configured run commands.
- Run typecheck validation scripts to verify code health: