Build Laravel Chatbots Faster: BotStart Makes BotMan Setup a Breeze

With BotStart, anybody can set up a fully functional BotMan project in under five minutes, all with one command!

Build Laravel Chatbots Faster: BotStart Makes BotMan Setup a Breeze

Building chatbots with Laravel and BotMan can be incredibly rewarding, but the initial setup process? Not so much. From installing multiple dependencies to configuring routes and drivers, the manual setup can be a bottleneck. That’s why I created BotStart, a powerful CLI tool that simplifies BotMan setup in Laravel, so you can focus on what really matters — building amazing bots.

In this guide, I’ll walk you through how to set up BotMan in Laravel using BotStart and explain why it’s a game-changer for chatbot developers. Whether you’re a beginner or a seasoned Laravel expert, this article will help you get started quickly and efficiently.

What is BotMan?

If you are reading this, there’s is a 70% chance that you know what BotMan is. But for the sake of the 30%, let us first explain what BotMan is before getting into BotStart.

What is BotMan?

BotMan is an open-source PHP agnostic framework designed to simplify chatbot development. With BotMan, you can easily create conversational bots for platforms like:

  • Telegram

  • Facebook Messenger

  • Slack

  • WhatsApp

  • And more!

BotMan provides a fluent API for handling messages, integrating with APIs, and managing conversations. But while the framework itself is simple to use, the setup process can be daunting, especially for newcomers to Laravel.

The Challenges of Setting Up BotMan

Manually setting up BotMan in Laravel involves:

  • Installing Laravel (if not already installed).

  • Adding BotMan packages and several drivers such as botman/botman and botman/driver-web.

  • Configuring routes, controllers, and environment variables.

  • Ensuring CSRF exceptions for BotMan routes.

These steps not only take time but also leave room for errors. For developers juggling multiple tasks, this can slow down progress.

Introducing BotStart

Enter BotStart, a CLI tool I created to automate the BotMan setup process. Whether you’re starting a fresh Laravel project or adding BotMan to an existing one, BotStart handles everything for you in seconds.

Key Features of BotStart

  • Automated Laravel Installation: Installs Laravel if it’s not already present, with options to specify the version.

  • BotMan Studio Setup: Adds all necessary BotMan dependencies and drivers.

  • Pre-configured Bot Routes: Includes a default /botman route and a basic hello command to get you started.

  • CSRF Exceptions: Automatically configures Laravel for BotMan’s needs.

  • VSCode Integration: Opens your project in VSCode if installed.

Why Choose BotStart Over Manual Setup?

Here’s how BotStart simplifies your workflow:

With BotStart, even a beginner can set up a fully functional BotMan project in under five minutes!

Step-by-Step Guide: Setting Up BotMan with BotStart

Step 1: Install BotStart

First, install BotStart globally using Composer:

composer global require prevailexcel/botstart

Ensure Composer’s global bin directory is added to your system’s PATH.

Step 2: Create a New BotMan Project

Run the following command to create a new project:

botstart new my-bot 10

IF you want to use the latest version, then just run

botstart new my-bot

This command does the following:

  • Installs Laravel (if not already installed).

  • Adds BotMan dependencies and drivers.

  • Configures routes, environment variables, and more.

  • Creates example Conversations.

  • Sets up CSRF on the botman endpoint

  • Opens the project on VS Code (If available).

Step 3: Test Your Bot

If it is not already opened on VS Code, then navigate to the project directory:

cd my-bot

You can either test from your terminal directly, or you can use the web widget to test.
To open Tinker for testing, run this command:

php artisan botman:tinker

Build Laravel Chatbots Faster: BotStart Makes BotMan Setup a Breeze

You can use the Web Widget by serving your application and going to the url.

Start the Laravel development server to test your bot:

php artisan serve

Then click on https://127.0.0.1:8000 to see the widget in action.

Build Laravel Chatbots Faster: BotStart Makes BotMan Setup a Breeze

You can start your development and build robust and fast bots as quickly and efficiently as possible.

Optionally, to connect to Telegram,
You can now go ahead to add your telegram token in the .env file.

TELEGRAM_TOKEN=your_telegram_token

Then you can run this command to connect your webhook to telegram.

php artisan botman:telegram:register

Add your_url.com/botman.

Behind the Scenes: What BotStart Does

When you run BotStart, it handles everything for you:

  1. Laravel Installation: Installs Laravel if missing, supporting versions like Laravel 10 or 11.

  2. BotMan Dependencies: Adds botman/botman, botman/driver-web, botman/driver-telegram, and the customized botman-tinker package.

  3. Configuration: Sets up routes, controllers, and CSRF exceptions.

  4. Default Commands: Includes a ready-to-use hello command to kickstart your development.

Why I Built BotStart

As a Laravel and BotMan developer, I wanted to eliminate repetitive setup tasks and make chatbot development more accessible. BotStart embodies my vision of a tool that’s fast, reliable, and beginner-friendly.

If you’re tired of manual setups or want a quicker way to get started with BotMan, BotStart is the solution.

Conclusion

BotStart transforms how developers work with BotMan and Laravel. It’s not just a tool — it’s a productivity booster that saves time, reduces errors, and simplifies the development process.

If you’re ready to supercharge your BotMan projects, give BotStart a try today. You’ll never go back to manual setup again.

Found this guide helpful? Share it with your network and help others discover BotStart.

Have questions or feedback? Let’s discuss in the comments.
Check out BotStart on GitHub and start building your chatbot with ease!

Thanks for reading till the end!

If you need any help or consultation, feel free to connect with me through any of the channels below:

To keep me motivated and writing more articles, you can buy me a cup of coffee:
BuyMeCoffee: Support Me Here

Chimeremeze Prevail Ejimadu