{"id":13836762,"url":"https://github.com/OtpChatBot/Ybot","last_synced_at":"2025-07-10T16:30:48.522Z","repository":{"id":6340369,"uuid":"7576377","full_name":"OtpChatBot/Ybot","owner":"OtpChatBot","description":"Ybot - is a helpful chat robot written with Erlang which supports different messaging protocols. [@0xAX]","archived":false,"fork":false,"pushed_at":"2014-04-27T17:28:13.000Z","size":1847,"stargazers_count":198,"open_issues_count":3,"forks_count":38,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-08-05T15:05:09.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OtpChatBot.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-12T14:49:20.000Z","updated_at":"2024-03-15T12:26:11.000Z","dependencies_parsed_at":"2022-08-26T16:32:51.049Z","dependency_job_id":null,"html_url":"https://github.com/OtpChatBot/Ybot","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtpChatBot%2FYbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtpChatBot%2FYbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtpChatBot%2FYbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtpChatBot%2FYbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OtpChatBot","download_url":"https://codeload.github.com/OtpChatBot/Ybot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225647752,"owners_count":17502128,"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-08-04T15:00:54.002Z","updated_at":"2024-11-20T23:31:41.934Z","avatar_url":"https://github.com/OtpChatBot.png","language":"Erlang","funding_links":[],"categories":["Erlang"],"sub_categories":[],"readme":"Ybot\n===============\n\nYbot is a customizable bot which was inspired by GitHub's [Hubot](http://hubot.github.com/). What can you do with `Ybot`:\n\n  * Chat bot with many different [plugins](https://github.com/0xAX/ybot-contrib).\n  * Bridge between `http` and different chat systems like `irc`, `xmpp` and etc...\n  * Notification chat bot. See [@erlnews](https://twitter.com/erlnews) twitter bot.\n  * Email bot.\n  * Logging (see [lager_ybot_backend](https://github.com/0xAX/lager_ybot_backend)).\n\n[![Build Status](https://travis-ci.org/0xAX/Ybot.png)](https://travis-ci.org/0xAX/Ybot)\n\nFeatures\n=========\n\n  * Ybot's core completely written in Erlang;\n  * Simultaneously run any number of bots on different transports;\n  * Web interface;\n  * Supports plugins in different technology:\n    * Python plugins;\n    * Ruby plugins;\n    * Shell plugins;\n    * Perl plugins;\n    * Erlang/OTP plugins;\n    * Elixir plugins;\n    * Scala plugins;\n  * Command history with tunable limit;\n  * Dynamic search and loading of plugins;\n  * Very easily extensible, just put plugin to plugin directory;\n  * Supports IRC and IRC via SSL;\n  * Supports XMPP and XMPP via ssl;\n  * Supports Campfire\n  * HTTP interface;\n  * HipChat supporting;\n  * Flowdock supporting;\n  * Twitter supporting;\n  * Email supporting;\n  * Skype supporting;\n  * Talkerapp supporting;\n  * Notifications supporting.\n\nBuilding and Running\n=====================\n\nFirst of all you must get your own Ybot:\n\n```\ngit clone https://github.com/0xAX/Ybot.git\n```\n\nOr download the source file archive: [.tar.gz](https://github.com/0xAX/Ybot/tarball/master) or [.zip](https://github.com/0xAX/Ybot/zipball/master)\n\nAfter getting source you need to download dependencies and build the source:\n\n```\n./rebar get-deps \u0026\u0026 ./rebar compile\n```\n\nRename configration template `ybot.config.template` to `ybot.config` and edit configuration file and you can run your Ybot copy:\n\nStart Ybot node:\n```\n./bin/start.sh\n```\n\nConnect to Ybot node console:\n```\n./bin/console.sh\n```\n\nRun on heroku\n===============\n\n  * Get you ybot and configure it.\n  * Download heroku\n\n```\ncd Ybot\nheroku create your-application-name -s cedar\nheroku config:add BUILDPACK_URL=http://github.com/heroku/heroku-buildpack-erlang.git\necho OTP_R15B01 \u003e .preferred_otp_version\ngit commit \"Select R15B01 as preferred OTP version\" .preferred_otp_version\ngit push heroku master\n```\n\nDependencies\n=============\n\n  * [lager](https://github.com/basho/lager) - A logging framework for Erlang/OTP.\n  * [reloader](https://github.com/bjnortier/reloader) - Mochiweb's reloader.\n  * [ibrowse](https://github.com/cmullaparthi/ibrowse) - Erlang http client.\n  * [jiffy](https://github.com/davisp/jiffy) - JSON NIFs for Erlang.\n  * [cowboy](https://github.com/extend/cowboy) - Small, fast, modular HTTP server written in Erlang.\n  * [mimetypes](https://github.com/spawngrid/mimetypes) - Erlang MIME types library.\n  * [erlang-oauth](https://github.com/tim/erlang-oauth) - An Erlang OAuth 1.0 implementation.\n  * [Skype4Py](https://github.com/awahlig/skype4py) - Platform independent Python wrapper for the Skype API.\n  * [gen_smtpc](https://github.com/0xAX/gen_smtpc) - Simple erlang smtp client.\n\nTransport\n==========\n\nYbot's basic transport is a network interface. Ybot is a chat bot and he\nspends all of his life chatting. Ybot receives chat messages and execute\ncommands depending on those received messages. At that moment Ybot\nsupports:\n\n  * IRC (+ssl supporting, +private messages supporting).\n  * XMPP MUC (+single user chat supporting, +private messages supporting, +ssl supporting).\n  * Campfire.\n  * HTTP.\n  * HipChat.\n  * Flowdock.\n  * Skype.\n  * Talkerapp.\n\nAnd also write-only transports:\n\n  * Twitter\n  * Channel\n\nPlugins\n==========\n\nYbot is a chat bot and it can execute different commands. Commands are\nsimple chat messages. For example, a chat session:\n\n```\nyou: Ybot math 1 + 5\nYbot: Answer: 6\n```\n\nHere are a few simple rules for structuring Ybot plugins.\n\n  * You must address messages to the `Ybot`.\n\n  * After addressing the bot you specify the command to be executed, for example `math` or `ping`. Every command consists from one word.\n\n  * After the command you can specify arguments. Ybot sends all arguments in '' and it turns them into one argument.\n\n  * One command = One plugin. Plugins must live in the `plugins` directory.\n\n  * Each plugin must have the correct extension, for example:\n\n    * .py\n    * .rb\n    * .shell\n  * Erlang/OTP plugin - see example memory plugin\n\nContaining Python, Ruby or shell code.\n\n  * The name of the plugin file must be the same name as the command.\n    For example if we have a `Ybot ping` command, we must have a plugin\n    named `ping.py` or `ping.rb` or `ping.shell`, etc.\n\n  * Plugin can consist of any code but write the results to `STDOUT` in the end.\n\nExample Ybot:\n\n```\nYbot math 3 ^ 2\n```\n\nHere Ybot calls the `math` plugin with the argument: '3 ^ 2'\n\nCurrent plugins\n================\n\n  * memory - Simple Key/Value memory.\n  * ackbar - show an Admiral Ackbar.\n  * chuck - Chuck Norris quotes.\n  * decide - Ybot try to help make decisions for you.\n  * github_status - Github status state.\n  * echo - simple echo plugin.\n  * help - Ybot help.\n  * ping - Ybot simple ping/pong.\n  * math - Ybot calculate math expressions.\n  * date - Ybot show date/time.\n  * pugme - Ybot pugme service plugin.\n  * erl   - Ybot computation of erlang expression using tryerlang.org.\n  * today? - Ybot return current day.\n  * shorten_url - Ybot url shortener with goo.gl.\n  * hacker_news - Ybot download news from https://news.ycombinator.com/\n  * wat - Ybot random WAT image\n  * check-site - Ybot check site up/down state\n  * ruby - Ybot eval simple ruby expression\n  * ip - Ybot external ip\n  * hacker_help - Ybot search in stackoverflow.\n  * translate - use google translate from Ybot.\n  * url - url encode/decode plugin.\n\nThese are Ybot's core plugins. You can find other plugins at [ybot-contrib](https://github.com/0xAX/ybot-contrib) or see at [ybot plugins catalog](http://0xax.github.com/ybot-plugins.html).\n\nYbot brain REST API\n============\nYbot brain allows to persist data using REST API. It is designed to support multiple storage engines, but the default is based on Mnesia.\n\nREST API endpoint: `http://localhost:8090/memories` (port and host is configurable). Currently supported Content Type is `application/json`.\n\nAn example JSON memory object:\n```json\n{\n \"id\":\"88DAF3FFB0419E0A8368036200000553620002B99862000429C1\",\n \"plugin\":\"foo\",\n \"key\":\"key1\",\n \"value\":\"foo1\",\n \"created\":\"2013-03-13 23:45:00\"\n }\n```\n\nOperations using brain API:\n\nOperation       | HTTP Verb | Url                     | Description\n----------------|-----------|-------------------------|-------------------------------------------------\nInsert new      | POST      | /memories               | Pass memory object without id and created field\nUpdate existing | PUT       | /memories/id            | Pass memory object without id and created field\nRemove by id    | DELETE    | /memories/id            | Delete field by id\nGet all         | GET       | /memories               | Return all fileds\nGet by id       | GET       | /memories/id            | Return field by id\nGet by plugin   | GET       | /memories/?plugin=foo   | Return data by plugin name\nGet by key      | GET       | /memories/?key=bar      | Return field by key\nGet by value    | GET       | /memories/?value=foobar | Return field by value\n\nContribute\n============\n\nYbot is an open source project under the Erlang public license (see LICENSE file). Issues, questions and patches are welcome.\n\nIf you're hacking Ybot core, please, before sending your pull request,\npull and merge Ybot master to avoid conflicts.\n\n  * Fork main ybot repository (https://github.com/0xAX/Ybot).\n  * Make your changes in your clone of ybot.\n  * Test it.\n  * Send pull request.\n\nAuthor\n========\n\nCreator of Ybot [@0xAX](https://twitter.com/0xAX).\n\nThank you all who participating in Ybot developing. Names and contact information of those who helped, you can find the file [AUTHORS](https://github.com/0xAX/Ybot/blob/master/AUTHORS).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOtpChatBot%2FYbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOtpChatBot%2FYbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOtpChatBot%2FYbot/lists"}