Installation and bootstrap

Installing Botpress on your computer and creating your first bot

Prerequisites

Botpress runs on Node.js (version >= 8.2). You must also have either npm or yarn installed.

Installing the CLI

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 -g npm flag or the global command 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

Creating your first bot

Create a new directory for your new bot called my-first-bot then run the following command in this folder:

botpress init

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

The dependencies might take a while to install the first time. If for some reason you get an error installing Botpress, please visit our Slack channel or open an issue.

Starting the bot

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.

Next steps

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!