Setting up your low-code environment
A starting point to get to know the ways of creating custom functionalities within the Betty Blocks platform.
The low-code environment extends the Betty Blocks platform by enabling developers to create and integrate custom functionalities. Using the Betty Blocks CLI (Command Line Interface), low-code developers can:
- Create custom page components and action steps
- Publish content to the Block Store
- Enable remote data connections
Requirements and tools
- Node.js
The first requirement for creating a component set is Node.js, as a custom component is a Node-based project. Go to http://nodejs.dev to download the latest version.
Download the LTS (Long Term Supported) version of Node.js — this way, you can access NPM (Node Package Manager) via your terminal or CMD. NPM will be used to install and configure the core sets provided by the Betty Blocks CLI for your code editor.
- Code editor
You will also need a code editor. We recommend Visual Studio Code for creating your custom components, as this is the one we use in this guide.
Betty Blocks CLI
The Betty Blocks CLI is a command-line tool that allows you to scaffold, develop, and manage custom components, action steps, and remote data sources outside the visual platform. It’s essential for working with the low-code environment because it connects your local development setup with the Betty Blocks platform.
Install the CLI
Open the command line on your computer (Terminal on MacOS and Linux or Cmd on Windows) and use the following command to install the Betty Blocks CLI:
npm install -g @bettyblocks/cli –no-optional
See more about working with the Betty Blocks CLI on our GitHub page.
In case you have issues installing Betty Blocks CLI, feel free to report them to the GitHub CLI Issues page or our Community
Check the CLI version
Check if and which version of the CLI is installed correctly on your computer by typing this command:
bb –version
It will return the version of your installed CLI:
To use the Betty Blocks CLI (Command Line Interface), you need to have Node.js and NVM installed. Node.js lets you run JavaScript outside the browser, and NVM (Node Version Manager) helps you easily switch between different versions of Node.js.
For more details, see Node Version Manager.
CLI usage
After installation, you will have access to the bb command in your CLI. When using a code editor such as Visual Studio Code, you can open the directory you are developing in and access the Terminal or CMD from there. This allows you to directly cast bb commands from the directory you are using for development.
You can start by using the following command:
bb help
You’ll see a list of available commands and options:
For more usage information, proceed to Betty Blocks GitHub CLI page.
Staying up-to-date
For your custom sets to continue working optimally, it’s important to keep your environment up to date. Make sure to check your bb version by using the bb --version command and checking the latest version on the CLI wiki to make sure that it’s updated.
Use the update command to update your bb version if you would like to update:
npm update -g @betty-blocks/cli --no-optional