You can write plugins to extend the features of your Funkwhale pod. Follow the instructions in this guide to get started with your first plugin.
```{contents}
:local:
:depth: 2
```
## Before you begin
Before you start writing your plugin, you need to understand the following core concepts:
```{contents}
:local:
:depth: 1
```
We'll explain each of these concepts in the next few sections
### Scopes
Plugins fall into two different **scopes**:
1. User-level plugins that are configured by end-users for their own use
2. Pod-level plugins that are configured by pod admins and are not connected to a particular user
User-level plugins can also be used to import files from a third-party service, such as cloud storage or FTP.
### Hooks
**Hooks** are entrypoints that allow your plugin to listen to changes. You can create hooks to react to different events that occur in the Funkwhale application.
An example of this can be seen in our Scrobbler plugin. We register a `LISTENING_CREATED` hook to notify any registered callback function when a listening is recorded. When a user listens to a track, the `notfy_lastfm` function fires.
**Filters** are entrypoints that allow you to modify or add information. When you use the `register_filter` decorator, your function should return a value to be used by the server.
In this example, the `PLUGINS_DEPENDENCIES` filter is used to install additional dependencies required by your plugin. The `dependencies` function returns the additional dependency `django_prometheus` to request the dependency be installed by the server.
Once you know what type of plugin you want to write and what entrypoint you want to use, you can start writing your plugin.
Plugins are made up of the following 3 files:
-`__init__.py` - indicates that the directory is a Python package
-`funkwhale_startup.py` - the file that loads during Funkwhale initialization
-`funkwhale_ready.py` - the file that loads when Funkwhale is configured and ready
### Declare your plugin
You need to declare your plugin and its configuration options so that Funkwhale knows how to load the plugin. To do this, you must declare a new `plugins` instance in your `funkwhale_startup.py` file.
Your `plugins` should include the following information:
```{list-table}
:header-rows: 1
* - Parameter
- Data type
- Description
* - `name`
- String
- The name of your plugin, used in the `.env` file