{"id":15693320,"url":"https://github.com/ryanio/bot-runner","last_synced_at":"2025-05-08T03:49:01.968Z","repository":{"id":128099339,"uuid":"442677972","full_name":"ryanio/bot-runner","owner":"ryanio","description":"A script to help orchestrate running multiple bot configurations.","archived":false,"fork":false,"pushed_at":"2024-02-08T22:31:29.000Z","size":128,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T03:48:55.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-29T06:12:20.000Z","updated_at":"2025-01-05T09:44:32.000Z","dependencies_parsed_at":"2024-02-08T22:59:53.240Z","dependency_job_id":"bc8e6f45-d720-476a-8d8e-5df9ae5fc154","html_url":"https://github.com/ryanio/bot-runner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanio%2Fbot-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanio%2Fbot-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanio%2Fbot-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanio%2Fbot-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanio","download_url":"https://codeload.github.com/ryanio/bot-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252996198,"owners_count":21837616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T18:42:54.676Z","updated_at":"2025-05-08T03:49:01.951Z","avatar_url":"https://github.com/ryanio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bot-runner\n\nA bot runner to help orchestrate running multiple bots in one instance, for example with [opensea-activity-bot](https://github.com/ryanio/opensea-activity-bot) and [discord-nft-embed-bot](https://github.com/ryanio/discord-nft-embed-bot).\n\n## Setup\n\n### Env\n\nSet `BOT_RUNNER_INSTANCES` to a JSON array that mimics the structure of `env-example.json` with your own variables.\n\nThe start command (default: `yarn run start`) will be run in the `node_modules` folder as specified by the key `bot`. To override the default start command, set on the instance key `command` with value e.g. `npm run anotherCommand`.\n\nTo generate the string output for `BOT_RUNNER_INSTANCES` in this directory run `node` then `JSON.stringify(require('./env-example.json'))`.\n\n#### Delay\n\nThe `delay` parameter is useful for staggering OpenSea requests from multiple activity bots when using the same API key. This can be set to the number of seconds to delay the bot, e.g. `30` to signify a delay of 30 seconds, which would evenly distribute requests between two bots that use the default interval of 60s.\n\n### Run\n\n`yarn start`\n\n#### Running on a server\n\nI recommend to use DigitalOcean over Heroku for improved stability. Heroku servers can restart (cycle) which can lead to duplicate posts since the ephemeral disk is lost.\n\nMy preferred setup is a $5/month Basic Droplet with Ubuntu. Install Node v16 and yarn, clone this repo, cd into it, run `yarn`, install [pm2](https://pm2.keymetrics.io/) with `yarn global add pm2`, set env vars, run `pm2 start yarn -- start`. Monitor with `pm2 list` and `pm2 logs`. Add log rotation module to keep default max 10mb of logs with `pm2 install pm2-logrotate`. To respawn after reboot, set your env vars in `/etc/profile`, then run `pm2 startup` and `pm2 save`.\n\n\n[![DigitalOcean Referral Badge](https://web-platforms.sfo2.digitaloceanspaces.com/WWW/Badge%203.svg)](https://www.digitalocean.com/?refcode=3f8c76216510\u0026utm_campaign=Referral_Invite\u0026utm_medium=Referral_Program\u0026utm_source=badge)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanio%2Fbot-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanio%2Fbot-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanio%2Fbot-runner/lists"}