an experimental irc client
1# comlink 2 3An experimental IRC client written in zig. Join the discussion in #comlink on 4libera.chat. 5 6![screenshot of comlink](screenshot.png) 7 8## Installation 9 10### Arch Linux 11 12[comlink](https://aur.archlinux.org/packages/comlink) is available as a package in the AUR. It can be installed using an AUR helper (e.g. paru). 13 14```sh 15paru -S comlink 16``` 17 18### Zig Build System 19 20`comlink` is written in zig and can be installed using the zig build system, 21version 0.14.0. 22 23```sh 24git clone https://github.com/rockorager/comlink 25cd comlink 26zig build -Doptimize=ReleaseSafe --prefix ~/.local 27``` 28 29## Configuration 30 31Configuration is loaded from `$HOME/.config/comlink/init.lua` 32 33Works best with `soju`. [irctoday](https://irctoday.com) runs a paid instance of `soju`, and 34another paid alternative is [pico.sh](https://pico.sh/irc) 35 36```lua 37local comlink = require("comlink") 38 39local config = { 40 server = "chat.sr.ht", 41 user = "rockorager", 42 nick = "rockorager", 43 password = "password", 44 real_name = "Tim Culverhouse", 45 tls = true, 46} 47 48-- Pass the server config to connect. Connect to as many servers as you need 49comlink.connect(config) 50 51-- Bind a key to an action 52comlink.bind("ctrl+c", "quit") 53``` 54 55Storing passwords in configuration files is generally considered a poor 56security practice. The following example reads the password from an external 57password manager: 58 59```lua 60local comlink = require("comlink") 61 62local proc = 63 assert(io.popen("hiq -dFpassword proto=irc address=irc.example.com nickname=alex", "r")) 64local password = proc:read("*l") 65proc:close() 66 67local config = { 68 -- …other fields here… 69 password = password, 70} 71``` 72 73## Contributing 74 75Patches accepted on the [mailing list](https://lists.sr.ht/~rockorager/comlink) 76 77Pull requests accepted on [Github](https://github.com/rockorager/comlink) 78 79Pull requests accepted on 80[tangled.sh](https://tangled.sh/@rockorager.dev/comlink)