{"id":31923173,"url":"https://github.com/rocketchat/botswana-snap","last_synced_at":"2026-03-08T00:32:30.259Z","repository":{"id":77807588,"uuid":"80462879","full_name":"RocketChat/botswana-snap","owner":"RocketChat","description":"BOTSwana : The Kalahari of bots.  Run any bot on any chat, painlessly!","archived":false,"fork":false,"pushed_at":"2017-09-10T04:29:36.000Z","size":56,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-10-22T13:11:35.154Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RocketChat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-01-30T20:58:11.000Z","updated_at":"2024-05-08T15:10:32.000Z","dependencies_parsed_at":"2023-03-12T02:09:09.516Z","dependency_job_id":null,"html_url":"https://github.com/RocketChat/botswana-snap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RocketChat/botswana-snap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Fbotswana-snap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Fbotswana-snap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Fbotswana-snap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Fbotswana-snap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RocketChat","download_url":"https://codeload.github.com/RocketChat/botswana-snap/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketChat%2Fbotswana-snap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30238880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:30:53.000Z","status":"ssl_error","status_checked_at":"2026-03-08T00:30:44.061Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-10-13T23:44:37.977Z","updated_at":"2026-03-08T00:32:30.250Z","avatar_url":"https://github.com/RocketChat.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BOTSwana: the [Kalahari](https://en.wikipedia.org/wiki/Central_Kalahari_Game_Reserve) of bots\n\nRun as many bots as you want, with as many chats (Rocket.Chat,  Slack, HipChat, and more...) as you want, painlessly!\n\nBOTSwana enables you to develop, test, manage and run fleets of bots right on your Linux system.\n\nYou no longer have to struggle with installing complex bot runtime; or give up privacy and pay dearly for bot SaaS.  \n\nLeverage the connectivity, storage, and multi-core computing power of your Linux system to manage and run tens (or hundreds!) of bots simultaneously.\n\n_*Unleash your personal Kalahari of Bots with BOTSwana TODAY !!*_\n\n# Installation\nUntil BOTSwana is officially registered at the snap store, [download the latest snap file](https://github.com/elespike/botswana-snap/releases) for your architecture and run:  \n`sudo snap install botswana_x.x.x_arch.snap --dangerous`\n\n# Authorizing users\nUsers must first be authorized to deploy and administer bots using BOTSwana. The root user can authorize other users by running:  \n`sudo snap run botswana.authorize add 1000`, replacing `1000` with the desired user ID.\n\nTo discover your regular user ID, simply run:  \n`id`\n\nSample output:  \n`uid=1000(my_user) ...`\n\n## Command reference for botswana.authorize\n```\n[*] Usage: sudo snap run botswana.authorize \u003caction\u003e [uid]\n[*] Possible actions are:\n    add         - add uid to the list of authorized users\n    remove, rm  - remove uid from the list of authorized users\n    delete, del - same as remove\n    list        - list all users present in the list of authorized users\n    purge       - remove all uids from the list of authorized users\n    Note: only the 'list' and 'purge' actions may be used without a uid\n```\n\n# Deploying bots\n## Interactively\nSimply run `snap run botswana.letloose` and follow the prompts!\n\n## Automated deployment\nFor greater control over your bot, or to control it via scripts:\n- Create a directory where to store the bot files; e.g.:  \n`mkdir /home/user/mybot`\n- Execute the following command, replacing `/home/user/mybot` with the directory you created:  \n`snap run botswana.deploy /home/user/mybot`\n\nSample output:\n```\n[+] Bot successfully deployed!\n[*] Edit, then execute the following file to configure and launch your bot:\n    /home/user/mybot/launch.sh\n```\n\nFinally, edit the `launch.sh` file to add the desired configuration, then execute it to run your bot as a background process.\n\n# Administering deployed bots\n## Listing active bots\nTo list all active bots, run:  \n`snap run botswana.admin list`\n\n### Queries\nTo find specific bots that may be active, boolean queries are available.\n\nAvailable query parameters are:\n- NAME\n- ADAPTER\n\nAvailable query connectors are:\n- IS\n- ISNT\n- AND\n- OR\n\nExamples:\n```\n# Find all active bots by the name \"mybot\":\nsnap run botswana.admin list NAME IS mybot\n\n# Find all active bots by the name \"mybot\" and adapter \"rocketchat\":\nsnap run botswana.admin list NAME IS mybot AND ADAPTER IS rocketchat\n\n# Find all active bots except ones whose adapter is \"rocketchat\":\nsnap run botswana.admin list ADAPTER ISNT rocketchat\n\n# For more complex boolean queries, surround the entire query in quotes to allow the use of parentheses.\n# Find all active bots except ones named \"mybot\", unless their adapter is \"rocketchat\":\nsnap run botswana.admin list \"NAME ISNT mybot OR (NAME IS mybot AND ADAPTER IS rocketchat)\"\n```\n\n## Deactivating bots\nTo stop all active bots, run:  \n`snap run botswana.admin stop`\n\n### Please note\nBots deployed via `snap run botswana.deploy` cannot be stopped with this command.\n\n### Queries\nTo stop specific bots, boolean queries are available.\n\nAvailable query parameters are:\n- NAME\n- ADAPTER\n\nAvailable query connectors are:\n- IS\n- ISNT\n- AND\n- OR\n\nExamples:\n```\n# Stop all active bots by the name \"mybot\":\nsnap run botswana.admin stop NAME IS mybot\n\n# Stop all active bots by the name \"mybot\" and adapter \"rocketchat\":\nsnap run botswana.admin stop NAME IS mybot AND ADAPTER IS rocketchat\n\n# Stop all active bots except ones whose adapter is \"rocketchat\":\nsnap run botswana.admin stop ADAPTER ISNT rocketchat\n\n# For more complex boolean queries, surround the entire query in quotes to allow the use of parentheses.\n# Stop all active bots except ones named \"mybot\", unless their adapter is \"rocketchat\":\nsnap run botswana.admin stop \"NAME ISNT mybot OR (NAME IS mybot AND ADAPTER IS rocketchat)\"\n```\n\n## Checking bot logs\nTo check the logs for a single bot, simply run:  \n`snap run botswana.admin diag`  \nThis will show the logs of the first bot process found by BOTSwana.\n\nIf multiple bots are active, use precise queries to select the desired bot:\n```\n# View logs for bot named \"mybot\" whose adapter is \"rocketchat\":\nsnap run botswana.admin diag NAME IS mybot AND ADAPTER IS rocketchat\n```\n\nPiping this command to `less` may be useful:  \n`snap run botswana.admin diag | less`\n\n## Command reference for botswana.admin\n```\n[*] Usage: snap run botswana.admin \u003caction\u003e [bot_name or PID]\n[*] Possible actions are:\n    list [query] - if [query] is omitted, list all running bots;\n                   otherwise, list running bots filtered by [query].\n    diag [query] - If [query] is omitted, show the logs for the first active bot found;\n                   otherwise, show the logs for the first active bot found via [query].\n    stop [query] - if [query] is omitted, stop all running bots;\n                   otherwise, stop running bots filtered by [query].\n\n    Query parameters: NAME, ADAPTER\n    Query connectors: IS, ISNT, AND, OR\n    Query example: \"NAME IS mybot AND ADAPTER IS rocketchat\"\n```\n\n## Adding scripts\n### Globally\nUsing `snap run botswana.letloose` gives you the ability to choose a scripts directory. E.g.:\n```\n[?] Where are guy_chapman's behavior scripts located?\n    Must point to an existing directory within /home/user.\n    \u003e /home/user/scripts\n```\n\nTherefore, every bot deployed which uses that directory for its scripts will load the same scripts therein contained.\n\nUsing `snap run botswana.deploy` gives you the same ability by specifying the scripts directory within the configuration section of `launch.sh`:\n```\n# If desired, change to a directory where to look for additional scripts\n# ./scripts will still be utilized regardless of this setting\nscripts_dir=\"/home/user/scripts\"\n```\n\n### Individually\nUsing `snap run botswana.letloose` creates an accessible directory where only this particular bot will look for scripts.\n\nTo learn the location of that directory, run:  \n`snap run botswana.admin list`\n\nSample output:\n```\n\u003e\u003e\u003e mybot \u003c\u003c\u003c\n[*] PID     - 12345\n[*] Adapter - rocketchat\n[*] URL     - https://mychat.com\n[*] Home    - /home/user/snap/botswana/common/mybot/aHR0cHM6Ly9teWNoYXQuY29t\n[*] Scripts - /home/user/scripts\n```\n\nNote the bot's Home directory:  \n`[*] Home    - /home/user/snap/botswana/common/mybot/aHR0cHM6Ly9teWNoYXQuY29t`\n\nThat directory will contain a scripts directory where only this bot will look for scripts:  \n`/home/user/snap/botswana/common/mybot/aHR0cHM6Ly9teWNoYXQuY29t/scripts`\n\nUsing `snap run botswana.deploy` creates the bot directory at the specified location, such as:  \n`snap run botswana.deploy /home/user/mybot`\n\nIn that case, the individual scripts directory will simply be:  \n`/home/user/mybot/scripts`\n\n# Redis\nBOTSwana automatically spawns a [Redis](https://redis.io/topics/introduction) server, by default only accessible locally, for quick and somewhat persistent storage for all bots.\n\n## Configuration\nA sample configuration file is included and accessible at:  \n`/var/snap/botswana/current/redis/redis.conf`\n\nTo modify Redis' configuration, first stop the service by running:  \n`sudo service snap.botswana.redis-server stop`\n\nThen, modify `/var/snap/botswana/current/redis/redis.conf` and start the service:  \n`sudo service snap.botswana.redis-server start`\n\n## Administration\nTo check the status of the embedded Redis server:  \n`sudo service snap.botswana.redis-server status`\n\nTo restart it:  \n`sudo service snap.botswana.redis-server restart`\n\nTo check its logs (assuming default configuration):  \n`cat /var/snap/botswana/current/redis/redis.log`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketchat%2Fbotswana-snap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocketchat%2Fbotswana-snap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketchat%2Fbotswana-snap/lists"}