Create a plugin
Learn how to create a new plugin with actions.
Last updated
Learn how to create a new plugin with actions.
Last updated
The repository will be used to store the plugin code and configuration.
Use the connery dev init
CLI command to initialize the plugin repository with all the necessary files and configuration.
This command will also create a sample action for you to explore and test.
Use the connery dev add-action
CLI command to add a new action to the plugin.
Open the ./src/actions
directory and find the newly created action file, define the input and output parameters of the action and implement the logic of the action in the handler
function.
Use the sample action as an example and draw inspiration from existing open-source plugins.
Let's run the plugin's sample action to see how it works. This is helpful for testing the action during the development process.
Use the following command to run the action from the plugin server. You should receive a response with the result of the action execution. The plugin server must be running to run the action.
Run the following command to commit and push all the files to GitHub.
Make sure you delete all the secrets you might be using during testing before pushing the changes to the repository.
To continue, you must install all the dependencies defined in the ./package.json
file. Run the following command to install the dependencies.
Run the following command to start the plugin server.
Check the plugin server documentation to learn more.
Open the plugin repository in GitHub Codespaces or clone it on your local machine.