> ## Documentation Index
> Fetch the complete documentation index at: https://empty-ad9a3406.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Plugin Manager

> Install, manage, and browse plugins

## Overview

The Plugin Manager is itself a plugin (`plugin-manager`). It provides a UI for managing all installed plugins and browsing the Community Store.

## Access

**Right-click** anywhere on the board (not on a plugin box) to open the Plugin Manager.

Press **Escape** to close it.

## Features

### Installed Plugins Tab

* View all installed plugins with icons and author info
* See enabled/disabled status
* **Pause** — toggle a plugin on/off
* **Delete** — permanently remove a plugin
* **System Protected** — the Plugin Manager cannot be paused or deleted

### Community Store Tab

* Browse community plugins from GitHub
* One-click install
* Shows "Already installed" for existing plugins
* Fetches from `plugins.json` in the community repo

### Manual Install

Install any plugin by URL:

1. Click **Install via URL**
2. Enter a unique ID
3. Paste the URL to a `.js` file
4. Click **Install**

## Docs Link

The Plugin Manager header includes a direct link to the [official documentation](https://empty-ad9a3406.mintlify.app/).

## UI Slot System

The Plugin Manager exposes a UI slot system that lets other plugins add elements to its header:

### `api.registerUI(slot, element, id?)`

```javascript theme={null}
// Add a button to the Plugin Manager header
const btn = document.createElement('button');
btn.textContent = '🎨';
btn.onclick = openThemes;

api.registerUI('header-actions', btn, 'theme-btn');
```

| Parameter | Type          | Description                               |
| --------- | ------------- | ----------------------------------------- |
| `slot`    | `string`      | Slot name (currently: `'header-actions'`) |
| `element` | `HTMLElement` | Element to inject                         |
| `id`      | `string`      | *(Optional)* Data attribute ID            |

**Behavior:**

* Automatically tracks ownership by plugin ID
* When a plugin is toggled off, its UI elements are cleaned up
* Elements are restored when the plugin is toggled back on

<Info>
  The Sample Theme plugin uses this API to add a 🎨 button to the Plugin Manager header.
</Info>

## Plugin Manager Auto-Recovery

The Plugin Manager has built-in recovery:

* **First boot:** auto-installs from its default GitHub URL
* **Deleted:** re-installed on next page load
* **Disabled:** re-enabled on next page load

This ensures the Plugin Manager is always available.

## Metadata

```javascript theme={null}
export const meta = {
  id: 'plugin-manager',
  name: 'Plugin Manager',
  version: '3.4.6',
  compat: '>=3.3.0'
};
```

## Configuration

The community store URL is set in the plugin source:

```javascript theme={null}
const COMMUNITY_URL = 'https://raw.githubusercontent.com/dheeraz101/Empty_Plugins/refs/heads/main/plugins.json';
```

## File

Hosted externally at:

```
https://raw.githubusercontent.com/dheeraz101/Empty_Plugins/refs/heads/main/plugin-manager.js
```
