Installation and bootstrap
Installing Botpress on your computer and creating your first bot
Using the Botpress CLI is the easiest and recommended way of creating bots on Botpress.
# using npm npm install -g botpress # using yarn yarn global add botpress
Note:️ Make sure you install the CLI as a global dependency, with the
-gnpm flag or the
globalcommand using yarn.
If you have a permission error at this stage, consider running the command as an administrator.
Once installed, make sure that Botpress is well installed. Running the following command should return the version of the CLI tool:
# long version botpress --version # shortcut bp --version
Create a new directory for your new bot called
my-first-bot then run the following command in this folder:
This will ask you a couple of questions and bootstrap a new bot from the default bot template. Once that is done, you need to install the dependencies:
# using npm npm install # using yarn yarn install
Once the dependencies are installed, you may start the bot:
# using npm npm start # using yarn yarn start
And that’s it! This will start the bot on your computer and provide you with a graphical interface at https://localhost:3000/, so that you can customize and speak to your bot.
Your bot currently doesn’t do much. In the next section, we will learn the basic components of a Botpress bot, to better prepare you to create your first customized bot!