This page is being phased out as part of our documentation reorganization.
Click this card to be redirected to the updated version with the most current information.
If you notice any discrepancies or areas needing improvement in the new documentation, please use the “Report an issue” button at the bottom of the page.
dify
and copied it to the /usr/local/bin
path, you can run the following command to create a new plugin project:
The plugin name must be 1-128 characters long and can only contain letters, numbers, hyphens, and underscores.
Extension
type plugin template as an example. For developers already familiar with plugin development, templates are not necessary, and you can refer to the interface documentation to complete different types of plugin development.
Use arrow keys in the terminal to select permissions, and use the “Tab” key to grant permissions.After checking all permission items, press Enter to complete the plugin creation. The system will automatically generate the plugin project code.
GUIDE.md
: A brief tutorial guide that leads you through the plugin writing process.README.md
: Basic introduction about the current plugin. You need to fill this file with information about the plugin and its usage instructions._assets
: Stores all multimedia files related to the current plugin.endpoints
: An Extension
type plugin template created following the CLI guidance, this directory contains all implementation code for Endpoint functionality.group
: Specifies key types, multilingual settings, and API definition file paths.main.py
: The entry file for the entire project.manifest.yaml
: The basic configuration file for the entire plugin, containing information such as required permissions and extension type.requirements.txt
: Contains Python environment dependencies.endpoints/test_plugin.yaml
, modifying it according to the following code:
/neko
, with a GET request method. The plugin’s functionality implementation code is in the endpoints/test_plugin.py
file.
endpoints/test_plugin.py
file, referring to the following example code:
.env.example
file and rename it to .env. Fill it with the remote server address and debugging key.
The .env
file:
python -m main
command to launch the plugin. You can see on the plugin page that the plugin has been installed into Workspace. Other team members can also access the plugin.
neko.difypkg
file in the current folder, which is the final plugin package.