AgentSmith
🕴 AgentSmith
AgentSmith allows you to communicate with the Matrix using your favourite IRC client (or bot).
This is just a silly proof of concept for now, but it looks promising. It is not yet recommended to use this in production.
Features
- Communicate with rooms which have set a main alias
- ~~Annoy~~ Delight others with colours
- File attachments are expanded as a HTTP link, ready to be opened by a browser
Features that still need to be done/would be nice to have
- ~~Rooms without main aliases (this perhaps also covers private messages)~~
- Maybe support multiple homeservers at once
- A nicer way to log in to your homeserver
- Several IRC commands (e.g. ~~
WHO
~~, ~~NAMES
~~,LIST
) - ~~Map permissions to IRC channel modes (e.g. Admin (100) ->
+o
, Moderator (50) ->+h
etc.)~~ - File uploads (DCC?)
- TLS
Installation
Install crystal
using your favourite package manager as guided by the Crystal
docs. After that, building AgentSmith should be as easy as:
shards build
The resulting binary is then located in ./bin/AgentSmith
.
macOS Mojave note: You may run into an error saying the compiler could not
find OpenSSL. To fix that, install openssl
from Homebrew and point
PKG_CONFIG_PATH
to OpenSSL's pkgconfig directory:
# zsh, bash:
export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
# tcsh:
setenv PKG_CONFIG_PATH /usr/local/opt/openssl/lib/pkgconfig
Usage
After building (see Installation section above), run it:
# Authenticate with your home server for the first time
./bin/AgentSmith -s https://your_homeserver_url
# Once you got your access token and exported the MATRIX_ACCESS_TOKEN variable,
# run it again to start the IRC server:
./bin/AgentSmith -s https://your_homeserver_url
Once the server is running, you can point your favourite IRC client to it and connect to the Matrix!
Development
Basically:
- Write new code
- (optionally) Write specs for your code
- Make sure it compiles and the specs work:
shards build
+crystal spec
- And, of course, make sure it starts up like it should (see Usage section above)
Contributing
- Fork it (https://github.com/nilsding/AgentSmith/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Run the Crystal formatter (
crystal tool format
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Georg Gadinger - creator and maintainer
Code of Conduct
Everyone interacting in the AgentSmith project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.