Update! The current version of the project is focused on creative Mastodon bots. The previous version is saved as creative-bots-archived and is no longer actively supported.
Creative Bots is an award-winning project template I originally created on Glitch to make it easier to reuse code between all of my creative online bots. With the source code also available on GitHub, you can easily host it on other services, like Heroku or DigitalOcean — see deployment instructions below.
You also see my own remix on Glitch that hosts most of my active bots. It also shows how the project lists all your bots, and has some examples of more advanced bots.
And be sure to check out my botmaking guide on Botwiki.
Oh wow, huge thanks to everyone who voted my Creative Bots to be the Best Fediverse App on @glitchdotcom.
And congratulations to everyone whose work is showcased here!
"If you have a favorite Mastodon bot or started learning to create your own, there’s a pretty good chance that @stefan was somehow involved in the journey. Through creating bots and the project jointhefediverse.net, Stefan’s impact on the Fediverse and Glitch cannot be understated!"
Huge thanks to @jenn, @anildash , and the rest of the @glitchdotcom team for the wonderful community they've helped create!
And congratulations to everyone on this list!
https://stefans-creative-bots.glitch.me: "a fun collection of digital projects, but also a pleasant reminder of how (relatively) easy it is to spin up something small and frivolous that makes the web a marginally-nicer place than it would otherwise be"
Shout out to @glitchdotcom for making it "(relatively) easy" to run projects like this!
Deployment
You should be able to run the project anywhere where node.js is supported. Below are instructions for a few popular platforms.
Glitch
Since the project is hosted on Glitch, you can simply remix it and follow the instructions in the README.
Note that running this project on Glitch requires a paid subscription.
Heroku
The following steps assume you already installed the Heroku command line tool and signed in. First, import the creative-bots project from Github. (I’ll use creative-bots
as the name of my imported project.)
After the project is deployed, you can download the code.
heroku git:clone -a creative-bots
Because you used the GitHub importer, you will see the following note:
Cloning into 'creative-bots'...
warning: You appear to have cloned an empty repository.
You are going to have to run the following commands:
cd creative-bots
git remote add origin https://github.com/stefanbohacek/creative-bots
git pull origin master
You can now rename .env-sample
to .env
, add your API keys, update your code, and push it back to Heroku.
git add .
git commit -am "Updated my bot."
git push heroku master
As your code runs, you can watch the logs:
heroku logs --tail -a creative-bots
Note that you will need at least the Hobby plan ($7/month) to keep your app running 24/7.
repl.it
Start by importing the creative-bots project. Use the command line to install dependencies with npm install
.
Next, rename the .env-sample
file to .env
and following instructions in the project’s README fill out your API keys.
If renaming the file causes any issues, you can create a new file called .env
and copy the content of .env-sample
into it.
Now you’re ready to update your code. When finished, click the Run button on top of the page.
Repl.it lets you pick five projects to keep always on as part of their paid plan, but they also allow pinging, so you could set up a service like cron-job.org to keep your app alive by visiting its home page.
Personal VPS
Download the project from GitHub., rename the .env-sample
file to .env
and add your API keys. Add your own bot code and you’re ready to go.
- DigitalOcean (you can use my referral link for $100 starter credit)