I've been creating an Emacs client for Keybase chat. Nice to not have to run the Electron application.

@loke started something similar, weechat plugin for keybase chat, but only got so far as enumerating conversations:

@madnat you will need to use a new feature that isn't in mainline Keybase yet. It allows you to tell the keybase application to sit and wait for incoming messages, and as soon as one comes in it will delver a JSON string with the messages content.

Without it you need to poll, which is not good.

Currently you have to build Keybase yourself from source to use it, but it will be part of the standard release soon

@loke that was the least for my worries for the time being. I've had trouble actually going through all the possible data that chat can return.

@madnat you can just ignore all messages that you're not interested in. All you need to get started is the sent message notification.

@loke yeah, but I would like to know the schema of messages that I am interested in.

I think it was supposed to be described using this Avaro stuff? But then some stuff didn't match in actual responses that I've got.

So I went through some code and find that had some rules and actual field names :)

Is there a simpler way that I am missing?

@madnat well, there are two API’s, the first one is the RPC protocol that is based on msgpack. It's actually not that complicated, and I implemented it in Emacs lisp. However, it's not very documented, and it's not very friendly to use.

The other is the JSON-based API that is exposed by the "keybase chat api" command. This one is much simpler, but until recently it lacked the ability to wait for incoming messages. This is the feature that will be official soon

@madnat thanks to this new feature I could move from the RPC API to the JSON based one. It's definitely a lot easier to use.

It did leave me with a reasonably complete implementation of msgpack for Emacs. Perhaps it should be released as a standalone library?

Sign in to participate in the conversation
Functional Café

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!