Learn how to install and run plugins with the Blnk CLI.
Important to note: This is an experimental feature.
Plugins enhance and extend the capabilities of your Blnk Ledger by providing additional features and functionalities tailored to meet your needs. In this guide, you’ll learn all about plugins, and how to install and run plugins on your server.Just like the Blnk Ledger, Plugins are also open-source. You can develop your own plugins for your project, but we require you to publish it on the Blnk Plugin public repository to be able to run them on your project using the Blnk CLI.
In this example, we’ll install the “Hello World” sample plugin. This plugin simply prints “Hello World” once it is run.
1
Install the hello-world plugin
bash
Copy
blnk plugins install hello-world
When it’s done, you get the following:
Output
Copy
✔ Plugin hello-world installed successfully.Warning: Plugin hello-world is not verified by Blnk. Use with caution.
While everyone is welcome to publish their plugins and contribute to Blnk’s open-source plugin directory, all plugins will go through an internal review process to verify their safety and ensure the security of our customers’ ledgers.The warning sign is shown when the plugin has not yet been verified by the Blnk team.
2
Run the command
bash
Copy
blnk plugins run hello-world
Here’s the response you get:
response
Copy
⠋ Running plugin hello-world...Hello World Plugin initializedHello World Plugin executed with event data: http://localhost:5001✔ Plugin hello-world executed successfully.
We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.To ask questions or discuss issues, please contact us or join our Discord community.