Skip to content

Speedybot Starter

1) Clone repo & install dependencies

git clone https://github.com/valgaze/speedybot
cd examples/speedybot-starter
npm install

2) Set your bot access token

You can set your BOT_TOKEN by running this script in the project directory:

npm run bot:setup <your_token_here>

Set token by hand Copy the file **[.env.example](.env.example)** as `.env` in the root of your project and save your access token under the `BOT_TOKEN` field, ex
BOT_TOKEN=__REPLACE__ME__

3) Boot it up!

  • Start up your agent

Note: By default your agent will communicate using websockets, so you won't need to worry about details like deployment or webhooks. Later down the line if you need to deploy your agent on a traditional server or ephemeral/serverless function infrastructure see here

npm run bot:dev

NPM Run Scripts

All you'll probably need are npm run bot:dev + maybe npm run bot:reset

ScriptDescription
npm run bot:onLaunches the SpeedyBot
npm run serveAlias for npm run bot:dev
npm run devAlias for npm run bot:dev
npm run bot:debugDisplays environment information for debugging
npm run bot:devLaunches the bot in development mode
npm run bot:resetResets the bot's configuration
npm run bot:setupSets up the bot for the first time
npm run bot:tokenAlias for npm run bot:setup
npm run bot:helpDisplays help information for the bot
npm run helpAlias for npm run bot:help
npm run bot:addsecretAdds a secret to the bot's configuration
Getting errors?

If you see an error like npm: command not found you probably need to install node or compatible runtime (like bun or deno) onto your system.

There are many ways to do this, but two easy ways:

Option 1. Download + install Node from the official site: https://nodejs.org/en/download

Option 2. Download with Volta in the terminal

sh
curl https://get.volta.sh | bash

volta install node

However you set up your system, make sure to run node -v in your terminal to verify node is correctly installed and you can take advantage of its rich ecoysten

If you see an error that reads somnething like Forbidden: User has excessive device registrations you can run npm run bot:reset, wait a few minutes and try again