{"id":16345448,"url":"https://github.com/unclechu/matrix-multipurpose-bot","last_synced_at":"2025-11-07T15:30:26.253Z","repository":{"id":41260530,"uuid":"504336125","full_name":"unclechu/matrix-multipurpose-bot","owner":"unclechu","description":"Multipurpose Matrix bot written in Haskell","archived":false,"fork":false,"pushed_at":"2024-10-13T21:53:49.000Z","size":182,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T22:24:35.585Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unclechu.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}},"created_at":"2022-06-16T23:40:51.000Z","updated_at":"2024-10-13T21:53:53.000Z","dependencies_parsed_at":"2024-12-27T22:33:09.854Z","dependency_job_id":null,"html_url":"https://github.com/unclechu/matrix-multipurpose-bot","commit_stats":{"total_commits":48,"total_committers":1,"mean_commits":48.0,"dds":0.0,"last_synced_commit":"24548107c85fd36124c6e0f7386287525179ee20"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fmatrix-multipurpose-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fmatrix-multipurpose-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fmatrix-multipurpose-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fmatrix-multipurpose-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unclechu","download_url":"https://codeload.github.com/unclechu/matrix-multipurpose-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239533067,"owners_count":19654617,"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-11T00:31:49.128Z","updated_at":"2025-11-07T15:30:26.190Z","avatar_url":"https://github.com/unclechu.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matrix Bot\n\n[Matrix](https://matrix.org) multipurpose bot.\n\n**Work in progress!** It’s in development but it’s supposed to work.\n\n## What it can do?\n\n- [x] Leave multiple reactions under user messages\n      (see `react_to_users` section in [example bot config])\n  - [x] Filter users by their MXIDs (equality check, see `users_filter`)\n  - [x] Filter events by room IDs (equality check, see `rooms_filter`)\n- [x] Reply with a message to media events (uploaded files)\n      (see `reply_to_media` section in [example bot config])\n      which can be useful for posting direct HTTP links to the files\n      in case room history permissions are allowing such direct access\n  - [x] Filter users by their MXIDs (equality check, see `users_filter`)\n  - [x] Filter events by room IDs (equality check, see `rooms_filter`)\n  - [x] Filter events by `msgtype` (equality check, see `msgtype_filter`)\n  - [x] Message is generated using a template allowing dynamic values\n        substitution (see `message_template`)\n  - [x] HTML-formatted message template in addition to the plain text one\n        (see `html_message_template`)\n\n## How to build \u0026 run\n\n### Nix\n\nNix is a recommended way to build the project.\n\nInstall Nix first: https://nixos.org/download.html#nix-install-linux\n\n``` sh\nnix-build -A matrix-bot.exe -o result-matrix-bot\nresult-matrix-bot/bin/matrix-bot --help\n```\n\nOr you can build it using `cabal` inside nix-shell:\n\n``` sh\nnix-shell\ncabal build\ncabal run matrix-bot -- --help\n```\n\nThis should print you the usage info.\n\n#### Running on Android\n\nThis application was tested to work on Android when built using Nix (Nix-on-Droid).\nJust run `nix-build` as shown above and it supposed to work as usual.\n\n- https://f-droid.org/en/packages/com.termux.nix/\n- https://github.com/t184256/nix-on-droid\n\n### Stack\n\n``` sh\nstack build\nstack run matrix-bot -- --help\n```\n\nYou can use [Stack](https://haskellstack.org/) with\n[Nix configuration of this project](default.nix) as well:\n\n``` sh\nnix-shell --arg buildTools '[\"stack\"]'\nstack build\nstack run matrix-bot -- --help\n```\n\n### Cabal\n\nTechnically you can build the project using just Cabal but there are no version bounds set for\ndependencies in the `*.cabal` file. So it’s not guaranteed that next release of some dependency it\nwould still build.\n\nYou can check for in [nixpkgs pin](nix/sources.json) and find what versions you are supposed to use.\n\n## Usage example\n\n1. Authenticate first, save the authentication credentials to a file:\n\n   ``` sh\n   pass show my-matrix-password | matrix-bot auth -u @username:matrix.org | jq \u003e auth.json\n   ```\n\n   N.B. Password is read from stdin by default. In the example above `pass` utility used to pass the\n   password to stdin of `matrix-bot`. `jq` is used to prettify the credentials JSON.\n\n2. Copy-paste the [example bot config] to `bot-config.json` for instance\n   and configure the bot properly in that `bot-config.json` file.\n\n3. Start the bot using credentials file and bot config file:\n\n   ``` sh\n   matrix-bot start --credentials auth.json --bot-config bot-config.json\n   ```\n\n## Usage help\n\nYou can call `matrix-bot --help` to get usage info but it only shows the first level of help.\nIt shows you information about basic commands (`auth`, `start`, etc). These commands in turn have\ntheir own help information you can reach by calling `--help` after the command name. Example:\n\n``` sh\nmatrix-bot auth --help\nmatrix-bot start --help\n```\n\n## License\n\n[GNU/GPLv3](LICENSE)\n\n## Author\n\nViacheslav Lotsmanov\n\n[example bot config]: bot-config-example.json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclechu%2Fmatrix-multipurpose-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funclechu%2Fmatrix-multipurpose-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclechu%2Fmatrix-multipurpose-bot/lists"}