> For the complete documentation index, see [llms.txt](https://docs.fylr.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fylr.io/for-developers/plugin.md).

# Plugin

Plugins extend fylr through a **callback system** that runs plugin programs in the file-worker tool chain. A plugin is a `manifest.yml` plus an arbitrary tree of resource files; it can add:

* [**Extensions**](/for-developers/plugin/extensions.md) — custom HTTP API endpoints under the plugin's base URL.
* [**Callbacks**](/for-developers/plugin/callbacks.md) — hooks fylr runs during its own API calls (db pre-save, transitions, collection uploads, export, export transport).
* [**Custom data types**](/for-developers/customdata.md) — new field types.
* **Frontend snippets** — JavaScript / CSS loaded into the web frontend.
* **Base-config additions** — extra configuration parameters (for example a plugin user).

fylr must be told to load a plugin in **`fylr.yml`** — either an individual plugin or a directory of plugins. Plugins may be packed into a [`.zip` file](/for-developers/plugin/release.md); fylr serves the resources from within the ZIP, unpacking files on the fly.

## How it fits together

A plugin program is run by the [execserver](/for-developers/execserver.md): fylr streams the program its **input** on STDIN, passes the **context** as the `%info.json%` argument, and reads the result from STDOUT. The [`exec` map](/for-developers/plugin/manifest.md#the-exec-map) in the manifest wires this up, and is the same for extensions and callbacks.

Because callbacks run server-side, they can [call back into the fylr API](/for-developers/plugin/callbacks/contract.md#calling-back-into-the-api) using short-lived tokens fylr hands them.

## Read next

* [**manifest.yml**](/for-developers/plugin/manifest.md) — the plugin descriptor: keys, the `exec` map, URL replacements.
* [**Extensions**](/for-developers/plugin/extensions.md) — add custom API endpoints.
* [**Callbacks**](/for-developers/plugin/callbacks.md) — hook into db saves, transitions, collection uploads and export.
* [**Custom Data**](/for-developers/customdata.md) — add custom data types.
* [**Plugin Conventions and Standards**](/for-developers/plugin/conventions.md) — build, naming, localization.
* [**Packaging and Release**](/for-developers/plugin/release.md) — the ZIP structure and GitHub release workflow.

## Managing plugins

Administrators install and enable plugins in the [Plugin Manager](/for-administrators/plugin-manager.md); the [`/api/v1/plugin`](/for-developers/api/endpoints/plugin.md) endpoint manages them over the API.
