Skip to main content
LynxHub card modules represent standalone features or tools shown as cards on the dashboard. Unlike extensions, modules run isolated CLI scripts, backend commands, and custom installation wizards. Follow this guide to create and test a simple card module.

Clone the starter template

To start developing quickly, first clone the host LynxHub application repository and navigate to its root folder. Then, clone the source branch of the official LynxHub Module Template directly into the module folder:
This sets up the following folder structure:
The template provides a fully working implementation of a ComfyUI card module. Under the 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 the package.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 the src/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 the src/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:
The host application automatically detects the /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:
Last modified on June 21, 2026