A simple TypeScript framework for declaratively composing bots with Puppeteer
MIT License
Botmation is a simple declarative framework for building bots in TypeScript using Puppeteer. It follows a simple, composable pattern focused on a single type of function called a BotAction.
BotActions do everything, from simple tasks in crawling and scraping the web, to logging in & automating social media. They are composable, so they are easily assembled.
The possibilities are endless!
“Everything should be made as simple as possible, but no simpler.” - Albert Einstein
It empowers Puppeteer code with a simple pattern to maximize code readability, reusability and testability.
Its compositional design comes pre-built with safe defaults for building bots with less code.
It encourages a learn at your own pace approach to exploring the possibilities of Functional programming.
Its Core library has 100% test coverage.
Botmation is a NodeJS library written in TypeScript. You'll need node.js LTS installed and the TypeScript compiler (tsc
) installed globally (or have a transpiling code step).
To get started, install Botmation's main package with npm
:
npm install --save @botmation/core
If you're just getting started, install puppeteer
:
npm install --save puppeteer
You can install any other @botmation packages to extend upon the available functionality:
npm install --save @botmation/instagram
Figure out the details with Botmation's Documentation for a deep reference into every package's functions with examples.
@botmation/core
is the main package consisting of all functions in the API of Botmation docs. It has the foundational functions for building bots and a little more. Other packages, like @botmation/instagram
have specific functions that work in conjunction with the core ones.
Import any core API function from:
import { chain, goTo, screenshot } from '@botmation/core'
@botmation/core
v1 has 17 groups of BotActions to choose from:
BotAction
'sBotAction
's in linesBotAction
's