Creating Plugins with the BuildFire CLI

Attila Buturla
3 min readMar 8, 2018

--

The latest release of the BuildFire CLI allows developers to quickly create and update plugins for the BuildFire platform. This includes cloning one of the many open source plugins. But first, a few words about BuildFire to those not familiar.

BuildFire is a SaaS platform for creating mobile apps for Android, iOS, and PWAs. Anyone from small business, to a large enterprises, use it to create apps through a simple to use web based interface. While it is a no-code solution, it does allow for full customization via BuildFire’s plugin system. Plugins utilize standard HTML and JavaScript, and allow you to do pretty much anything. This includes native device features, calling external APIs, and more.

The CLI greatly simplifies the process of creating plugins. To get started, complete the following steps:

  1. Install Node.js on your development machine, if you haven’t already.
  2. Install git, if you haven’t already.
  3. Run the following command. It will install the BuildFire CLI.

npm install buildfire-cli -g

3. The next step is to install the BuildFire SDK itself. The SDK allows you to test plugins locally on your dev machine. Navigate to a folder that you want to put the SDK in, and execute the following:

buildfire init

4. This creates the BuildFireSDK folder. Navigate to the newly created BuildFireSDK folder. From here you can create new plugins, or clone existing plugins. If you simply run the command buildfire, it will show you which commands are available via the CLI.

CLI Commands

5. If you wish to create a new plugin, the CLI provides several templates to help you get started. Currently there are two templates, with plans to add additional ones in the future. The available template are webpack and React. If you’re familiar with, or wish to learn React, use the React template. If not use the webpack template. (The webpack template doesn’t require any knowledge of webpack.)

To create a new plugin using the webpack template, execute the following command, replacing <pluginName> with the name of your new plugin.

buildfire plugin init <pluginName> webpack

6. This will create a shell of a plugin, under the BuildFireSDK/plugins folder. To complete the setup execute the following from the new plugin folder (BuildFireSDK/plugins/pluginName). It will install the necessary dependencies and will make the plugin ready for testing.

npm install ; npm start

7. In another terminal window, run the following command from the BuildFireSDK folder. This will open the plugin tester, and is a great way to test your plugins without having to use a mobile device

BuildFire Plugin Tester

buildfire run

That’s the basics to get you up and running. There’s already other great resources that will help you with the details of plugin development. Once you have developed your plugin you can upload to the marketplace, and either add it to your app or sell it to other app makers. All that’s need is to register for a BuildFire developer account. This is entirely free, and just requires basic info such as an email and password.

We’re looking forward to what you come up with!

--

--