> ## 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.

# Plugin system overview

> Understand LynxHub plugin capabilities and learn when to build an extension or a module.

LynxHub provides a powerful plugin system that allows you to extend application capabilities. You can build plugins to integrate new AI engines, customize the user interface, or automate developer workflows.

The plugin system supports two types of integrations: **modules** and **extensions**.

***

## Core concepts

### What is a module?

Modules represent standalone features or AI engines. They are displayed as interactive **cards** inside the LynxHub interface. Examples include Stable Diffusion, ComfyUI, or local llama.cpp models.

* **Purpose**: Integrate external tools, scripts, or local binaries that require dedicated configuration and execution.
* **UI style**: Appears as a self-contained card under specific tabs (such as image generation or text generation). It features argument inputs, installation wizards, and terminal status monitors.
* **Process architecture**: Modules run backend processes (such as Python scripts) in the background via a terminal shell. The host process controls execution and handles status tracking.

### What is an extension?

Extensions are dynamic plugins designed to integrate deeply with the LynxHub core client shell.

* **Purpose**: Add custom pages, modify the layout, listen to global events, inject state management, or add system tray widgets.
* **UI style**: Injects React components directly into predefined host layout slots (such as the Title Bar, Status Bar, Settings page, or Sidebar navigation).
* **Process architecture**: Runs continuously in both the main process (Node.js) and the renderer process (Chromium). The renderer elements load dynamically at runtime using Webpack Module Federation.

***

## Comparative matrix

Use this table to understand the key differences between modules and extensions:

| Feature                  | Modules                                     | Extensions                                          |
| :----------------------- | :------------------------------------------ | :-------------------------------------------------- |
| **Primary Focus**        | Standalone AI tool or script execution      | Deep shell UI integration and customization         |
| **UI Integration**       | Standardized card in category routes        | Predefined slots, custom routes, tray, or title bar |
| **Core Technology**      | Rollup + ES modules                         | Vite + Webpack Module Federation                    |
| **Lifecycle**            | Started and stopped by the user             | Runs continuously in the host background            |
| **State Management**     | Handled by host Zustand and Redux stores    | Can inject custom Redux reducers and middleware     |
| **Terminal Integration** | Built-in stream output to host terminal tab | Manages background tasks or sub-processes manually  |

***

## Choosing the right plugin type

Select the integration model that best fits your requirements:

### Choose a module if:

* You want to bring an existing AI model, tool, or console script (such as ComfyUI or a custom Python script) into LynxHub.
* You want LynxHub to automatically manage installation (such as `git clone` or `pip install`), updates, and process execution.
* Your tool fits nicely into a standardized card interface with configuration parameters.

### Choose an extension if:

* You need to add a brand-new top-level tab or custom route outside the standard card-style pages.
* You need to modify the main frame layout, such as putting a status widget in the title bar or adding custom menu items to the tray.
* You want to hook into global application lifecycle events, state changes, or listen to all window events.

***

## Next steps

Ready to start building? Refer to the quick start guides:

<CardGroup cols={2}>
  <Card title="Build extensions" icon="puzzle-piece" href="/plugins/extensions/quick-start">
    Create user interface elements and widgets to enhance the LynxHub workspace.
  </Card>

  <Card title="Build modules" icon="cubes" href="/plugins/modules/quick-start">
    Build backend integrations and connect custom services to your client.
  </Card>
</CardGroup>
