Get Started with Botonic Framework

Start building high quality conversational apps with tech you already know and love
Join the Botonic developer community on Slack
1
Install Botonic
npm install -g @botonic/cli

First, install Node.js. Then, install the latest Botonic command-line tools in your terminal. Windows is not supported yet.

2
Create a bot
botonic new myBot tutorial

Create a new bot from the tutorial template. Botonic will automatically scaffold the project structure, install all the required dependencies and make the first build.

Feel free to browse through the files and read the code, we've included lots of comments so you can understand what every piece of code does.

3
Run your bot
cd myBot
botonic run

Start an interactive chat session in your terminal. Type "start" and follow the dialog with the bot, it will teach you some basic concepts. When you're done exit with /q or Ctrl+C.

4
Create a new route
botonic.config.js

Now we're going to make the chatbot answer to the input "What time is it?".

Edit the file botonic.config.js and add a new rule in the "routes" array. The code in the right side shows how to map any input whose text matches a regular expression with an action. In this case, we're mapping all inputs that contain the word "time" to an action that we'll create in the next step.

5
Create a new action
src/actions/time.js

Actions are just React components in the folder src/actions. Create a new file time.js there and copy the code on the left. You'll notice that components don't output regular HTML but RCML (Rich Conversational Markup Language), a language that unifies all the different types of messages you can send on messaging apps like Facebook Messenger, Telegram, etc.

Now you can execute botonic run again and ask your bot "what time is it?".

6
Deploy your bot
botonic deploy

Upload your bot to hubtype.com cloud. You can create an account right from the terminal. Then enter a name for your bot and that's it, your bot will be deployed in a few seconds!

7
Connect a messenger
open https://app.hubtype.com

Log in to Hubtype's dashboard and integrate a messenger like Telegram or Facebook Messenger so that users can reach you.

Congratulations! You're done 🎉
Ready to learn more? Check out docs.botonic.io.