1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
|
== One Client for Everything
== Table of Contents
[arabic]
. link:#foreword[Foreword]
. link:#two-ways-of-solving-this[Two ways of solving this]
. link:#the-web-app-way[The web app way]
. link:#gui-or-terminal-client[gui or terminal client]
. link:#matrix-or-irc[Matrix or IRC]
=== Foreword
First let’s talk about the problem we’re trying to solve here. I want to
have a unified interface into all the communication forms that I use. I
can’t be bothered to have different clients open all the time. I want to
have one client that takes care of all things mostly well.
=== Two ways of solving this
There is generally two ways one can try to solve this. Number one is to
just use a browser. Almost all forms of comm nowadays have a web client
so basically one way of solving our problem is to a dedicated browser
that has all the clients open. Mind you, there are even specialized and
more lightweight browser offerings specifically geared towards this
use-case but still this option is not ideal in terms of resources and
the interface you’re getting is not really unified.
==== The web app way
An example that comes to mind for this sort of solution is `rambox`
though they are no longer offering a FOSS solution. I’m just mentioning
them as an example of what’s being offered out there as a ready-to-use
solution.
Although this way of doing things is very resource-intensive, this is
the *complete* way of doing things. What I mean by that is that by using
the official web apps, you will not be compromising on any features that
the clients offer since you will be using the official clients.
==== gui or terminal client
The second way of going about and solving this is to pick a very good
client that supports a protocol with a lot of bridges and then bridge
everything through to the app of that one protocol. Currently there are
only three protocols that have enough facilities for bridging to make
this feasible. IRC, Matrix and XMPP. I’m adding XMPP for the sake of
completion but in terms of practicality XMPP doesn’t have nearly as many
bridges as IRC and Matrix.
So this basically narrows down our choice to either IRC or Matrix. Now
lets look at the clients that are available for these two protocols.
==== Matrix or IRC
The last requirement on my side is that i would rather use a unified
terminal keyboard-based client than a web application client. That being
said, i definitely expect to use a web client since using a terminal
client on a smart phone is pretty much just pain. A lot of pain.
Unfortunately at the time of writing this post, Matrix has no terminal
client that comes close to either https://github.com/irssi/irssi[irssi]
or https://github.com/weechat/weechat[weechat], both terminal clients
originally only supporting IRC but later advertising themselves as
multi-chat clients. Also as an added bonus, starting from the next irssi
release which should be irssi v1.5 one can elect not to build the IRC
module at all while building irssi.
Matrix and IRC both have a rich ecosystem of bridges. Matrix has a
growing fan base which means more and more bridges or tools with similar
functionality will be releases for it. Contrast that with IRC where that
number seems to be smaller than Matrix but still is very much alive and
well.
=== https://github.com/bitlbee/bitlbee[bitlbee-libpurple]
....
it'll be bitlbee
....
bitlbee is a bridge software for IRC. The distinguishing feature for
bitlbee is that the way it bridges other protocols to IRC is by
masquerading as an ircd. You could also use libpurple as the backend for
bitlbee (https://wiki.bitlbee.org/HowtoPurple[link]). libpurple has an
origin story similar to libreadline. Basically it used to live inside
pidgin, but later on it was turned into a library so that other
applications could use it as well.
List of protocols supported by libpurple:
....
aim
bitlbee-discord
bitlbee-mastodon
bonjour
eionrobb-icyque
eionrobb-mattermost
eionrobb-rocketchat
facebook
gg
hangouts
hehoe-signald
hehoe-whatsmeow
icq
irc
jabber
matrix
meanwhile
novell
otr
simple
sipe
skypeweb
slack
steam
telegram-tdlib
zephyr
....
=== https://github.com/42wim/matterbridge[matterbridge]
matterbridge is an everything-to-everything bridge.
Please keep in mind that with matterbridge, you don’t get the full
functionality of a protocol as in you get no private messages and such.
You get the ability to join public chat rooms or whatever they call it
in that protocol.
=== bridge ircds
==== https://github.com/42wim/matterircd[matterircd]
a mattermost bridge that emulates an ircd as the name implies.
==== https://github.com/progval/matrix2051[matrix2051]
another bridge that emulates an ircd, but for matrix.
==== https://github.com/adsr/irslackd[irslackd]
a bridge to slack that emulates an ircd.
==== docker compose
https://github.com/ezkrg/docker-bitlbee-libpurple[Here]’s the original
Dockerfile. You can find mine
https://github.com/terminaldweller/docker-bitlbee-libpurple[here]. And
here’s the docker compose file I use that goes with that:
[source,yaml]
----
version: "3.8"
services:
bitlbee:
image: devi_bitlbee
deploy:
resources:
limits:
memory: 384M
logging:
driver: "json-file"
options:
max-size: "100m"
networks:
- bitlbeenet
ports:
- "127.0.0.1:8667:6667"
- "172.17.0.1:8667:6667"
restart: unless-stopped
user: "bitlbee:bitlbee"
command:
[
"/usr/sbin/bitlbee",
"-F",
"-n",
"-u",
"bitlbee",
"-c",
"/var/lib/bitlbee/bitlbee.conf",
"-d",
"/var/lib/bitlbee",
]
dns:
- 9.9.9.9
volumes:
- ./conf/bitlbee.conf:/var/lib/bitlbee/bitlbee.conf:ro
- userdata:/var/lib/bitlbee
- /home/devi/.cache/docker-bitlbee/signald/run:/var/run/signald
- /etc/ssl/certs:/etc/ssl/certs:ro
signald:
image: signald/signald:stable
deploy:
resources:
limits:
memory: 384M
logging:
driver: "json-file"
options:
max-size: "100m"
networks:
- signalnet
ports:
- "127.0.0.1:7775:7775"
- "172.17.0.1:7775:7775"
restart: unless-stopped
dns:
- 9.9.9.9
volumes:
- /home/devi/.cache/docker-bitlbee/signald/run:/signald
- /etc/ssl/certs:/etc/ssl/certs:ro
environment:
- SIGNALD_ENABLE_METRICS=false
- SIGNALD_HTTP_LOGGING=true
- SIGNALD_VERBOSE_LOGGING=true
- SIGNALD_METRICS_PORT=7775
- SIGNALD_LOG_DB_TRANSACTIONS=true
matterircd:
image: 42wim/matterircd:latest
deploy:
resources:
limits:
memory: 384M
logging:
driver: "json-file"
options:
max-size: "100m"
networks:
- matterircdnet
ports:
- "127.0.0.1:7667:7667"
- "172.17.0.1:7667:7667"
dns:
- 9.9.9.9
restart: unless-stopped
command: ["--conf", "/matterircd.toml"]
volumes:
- ./matterircd.toml:/matterircd.toml:ro
networks:
bitlbeenet:
signalnet:
matterircdnet:
volumes:
userdata:
matterircddb:
----
==== SMS
I have an entire post about how one can get their SMS on IRC
link:posts/how_to_get_your_sms_on_irc[here]. You need a piece of
software on your phone to forward the SMS to a web hook server and then
we send the SMS over to IRC. You can find the web-hook server that I use
https://github.com/terminaldweller/sms-webhook[here].
==== where to sink all the bridges
Bridges connect two things. You need to have a sink for your bridges. I
was contemplating making a lot of invite-only channels protected by
password on public networks then I found out about
https://github.com/ergochat/ergo[ergo]. I’d say the main advantage of
using ergo is, it’s easy to setup. You don’t need any other services to
run to get basic functionality like chanserv or nickserv. You don’t even
need a bouncer if you need to have your messages when your client
disconnects. ergo has that functionality built-in. Here are some other
perks:
* ergo allow you to define a ``private'' IRC network. You do that by
requiring SASL while connecting, so others can’t connect to your
instance without having an account
* it is under active development
* it has good documentation
* its one executable written in go so it’s very easy to deploy
==== bots
We have LLMs now. The genie is out of the box. They are useful.’ I
needed a bunch of them to I wrote
https://github.com/terminaldweller/milla[milla]. At the time of writing
milla supports chatgpt, gemini and of course ollama.
===== Deploying milla
[source,yaml]
----
version: "3.9"
services:
milla:
image: milla
build:
context: .
deploy:
resources:
limits:
memory: 64M
logging:
driver: "json-file"
options:
max-size: "100m"
networks:
- millanet
restart: unless-stopped
command: ["--config", "/opt/milla/config.toml"]
volumes:
- ./config.toml:/opt/milla/config.toml
cap_drop:
- ALL
dns:
- 9.9.9.9
environment:
- SERVER_DEPLOYMENT_TYPE=deployment
entrypoint: ["/milla/milla"]
networks:
millanet:
----
[source,toml]
----
ircServer = "irc.terminaldweller.com"
ircPort = 6697
ircNick = "mybot"
ircSaslUser = "mybot"
ircSaslPass = "mypass"
ircChannel = "#mychannel"
ollamaEndpoint = ""
temp = 0.2
ollamaSystem = ""
requestTimeout = 10
millaReconnectDelay = 60
enableSasl = true
model = "llama2-uncensored"
chromaStyle = "rose-pine-moon"
chromaFormatter = "terminal256"
provider = "ollama" # ollama, chatgpt, gemini
apikey = "key"
topP = 0.9
topK = 20
----
timestamp:1713480455
version:1.0.0
https://blog.terminaldweller.com/rss/feed
https://raw.githubusercontent.com/terminaldweller/blog/main/mds/oneclientforeverything.md
|