6
1
mirror of https://git.mills.io/saltyim/saltyim.git synced 2024-06-30 18:51:03 +00:00
saltyim is the Go library and reference client and broker implementation for Salty IM it contains a command-line client (cli), a terminal user interface (tui), builtin server/broker and a Mobile / Desktop App PWA (progressive web app)
Go to file
2022-03-17 10:55:36 +10:00
.gitignore Give messages a bit of a format 2022-03-16 23:21:53 +10:00
LICENSE Initial Commit 2022-03-16 22:45:16 +10:00
README.md Update README 2022-03-17 07:32:53 +10:00
salty-chat Write an ASCII Bell on new messages 2022-03-17 07:47:03 +10:00

salty-msgbus-chat

A rudimentary terminal / command-line based chat system using the salty command-line tool for encrypting and decrypting messages using the saltpack message format and using msgbus as transport.

Requirements

If you have Go installed:

$ go install git.mills.io/prologic/msgbus/cmd/msgbus@latest
$ go install go.mills.io/salty/cmd/salty@latest
$ go install go.mills.io/salty/cmd/salty-keygen@latest

Quick Start

salty-chat make-user

Setup

SKip this section if you ran salty-chat make-user

Keys

To generate your Private / Public keys:

$ salty-keygen -o $HOME/.config/salty/$USER.key

Setup an environment variable in your shell to point SALTY_IDENTITY to $HOME/.config/salty/$USER.key. For example:

export SALTY_IDENTITY="$HOME/.config/salty/$USER.key"

Endpoint

First you need to setup msgbus somewhere, see that project for details on how to set this up. Or you can just use the instance I run at https://msgbus.mills.io/ (just please don't abuse it!)

Discovery

Create a JSON file called <user>.json and place it at the root of your domain on a path like /.well-known/salty/user.json. The conents of which are:

{
  "endpoint": "https://msgbus.mills.io",
  "topic": "prologic",
  "key": "kex1ekt5cru4vs42wnaxppkjn5pexmt2w6uxx9z2mz0fqeuc80e0g9gsggs8ah"
}

You can see an example of prologic@mills.io

Usage

Sending a message

$ ./salty-chat send prologic@mills.io Test
2022/03/17 01:46:14 Reading message from stdin...

Receiving your Messages

$ ./salty-chat read
INFO[0000] successfully connected to wss://msgbus.mills.io/prologic
# signed by: kex1ekt5cru4vs42wnaxppkjn5pexmt2w6uxx9z2mz0fqeuc80e0g9gsggs8ah
[2022-03-17T01:23+10:00] <prologic> Test
# signed by: kex1ekt5cru4vs42wnaxppkjn5pexmt2w6uxx9z2mz0fqeuc80e0g9gsggs8ah
[2022-03-17T01:46+10:00] <prologic> Test

License

salty-msgbus-chat is licensed under the terms of the WTFPL license.