Let's install and create our first Botonic bot!
Step 1 – Install the Botonic Command Line Interface
- Install the LTS version of NodeJS.
- Verify the installation version by running
Note: You must have at least
node >= 10.0.0version installed. You can also use Yarn.
- Perform a global installation by running
sudo npm install -g @botonic/cli(Mac/Linux) or
npm install -g @botonic/cli(as admin on Windows).
- Wait until the CLI is installed.
Step 2 – Create a Bot
botonic new <bot_name>
- Select one of the templates available.
Congratulations: Your bot is created!
Note: You can optionally pass the name of the template as a second argument such as
botonic new <bot_name> tutorial
Step 3 – Test Your Bot
- Set yourself in the directory you created:
- Test your bot in your browser by running
botonic serve(Mac/Linux) or
npm run start(Windows).
- Copy the development server URL (generally http://localhost:8080/) and paste it in your browser.
- Try chatting with your bot!
Note: If you started with the "blank" template, the bot answers with "I don't understand you".
Step 4 – Deploy Your Bot
- From your command line, run
- Enter your credentials (email/password) if you already signed up at app.hubtype.com or create a new account as recommended.
- Give a name to your bot and wait for your project to be deployed.
Step 5 – Publish Your Bot
- Once the deploy is finished, go to the Hubtype dashboard at app.hubtype.com.
- Click on the bot icon and search for your bot in the list.
- Click on Integrate a messenger and select a provider.
- Follow the instructions to connect your bot to the chosen provider.
- Enjoy the conversation.
Congratulations! You’ve installed and deployed your first bot!
Note: If you experience any error while testing or deploying your bot, try to run
npm run buildfor a more detailed trace.