6
1
mirror of https://git.mills.io/saltyim/saltyim.git synced 2024-06-25 16:28:20 +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-21 16:14:38 +10:00
.chglog Add chglog config 2022-03-20 00:49:56 +10:00
.dockerfiles Add a Dockerfile and push to prologic/salty-chat as well as a Drone CI config for CI/CD 2022-03-21 14:37:31 +10:00
bin Restructure sample hooks and move shell script version to bin/ 2022-03-20 21:09:14 +10:00
cmd/salty-chat Fix passing prehook/posthook flags that 7ccd59e broke :D 2022-03-21 10:42:49 +10:00
hooks Restructure sample hooks and move shell script version to bin/ 2022-03-20 21:09:14 +10:00
infrastructure Update README and add docs for Infrastructure setup 2022-03-21 01:16:31 +10:00
tools Add lookup command (#4) 2022-03-18 14:48:59 +00:00
.drone.yml Fix Drone CI config 2022-03-21 14:38:55 +10:00
.gitignore Add spport for pre/post hooks for read command 2022-03-20 09:35:47 +10:00
.goreleaser.yml Publish releases straight away 2022-03-20 00:46:54 +10:00
CHANGELOG.md Update CHANGELOG for 0.0.13 2022-03-21 11:21:26 +10:00
client.go Register tcell encodings (Fixes #23) 2022-03-21 16:14:38 +10:00
config.go Add make-user command (#9) 2022-03-19 11:42:36 +00:00
Dockerfile Add a Dockerfile and push to prologic/salty-chat as well as a Drone CI config for CI/CD 2022-03-21 14:37:31 +10:00
errors.go Add spport for pre/post hooks for read command 2022-03-20 09:35:47 +10:00
example-config.yml feat: make endpoint uniform. add profiles (#30) 2022-03-21 00:31:59 +00:00
format.go Further improve the formatting 2022-03-20 15:46:38 +10:00
go.mod Make lookups less noisey, remove use of beeep 2022-03-21 11:21:18 +10:00
go.sum Make lookups less noisey, remove use of beeep 2022-03-21 11:21:18 +10:00
identity.go feat: make endpoint uniform. add profiles (#30) 2022-03-21 00:31:59 +00:00
LICENSE Add lookup command (#4) 2022-03-18 14:48:59 +00:00
lookup.go Make lookups less noisey, remove use of beeep 2022-03-21 11:21:18 +10:00
Makefile Add a Dockerfile and push to prologic/salty-chat as well as a Drone CI config for CI/CD 2022-03-21 14:37:31 +10:00
preflight.sh feat: hax for great justice (#14) 2022-03-19 21:33:03 +00:00
README.md Add a Dockerfile and push to prologic/salty-chat as well as a Drone CI config for CI/CD 2022-03-21 14:37:31 +10:00
readmsgs.go Make lookups less noisey, remove use of beeep 2022-03-21 11:21:18 +10:00
sendmsg.go Rebuild the shitty UI using tcell/tview 2022-03-20 11:19:21 +10:00
tview.go Improve the UX colors 2022-03-20 13:57:20 +10:00
utils.go feat: make endpoint uniform. add profiles (#30) 2022-03-21 00:31:59 +00:00
version.go Add lookup command (#4) 2022-03-18 14:48:59 +00:00

Salty IM

Build Status

Quick Start

$ go install go.mills.io/saltyim/cmd/salty-chat@latest
$ salty-chat make-user user@domain
$ salty-chat chat prologic@mills.io

NOTE:

As of 19th March 2022 15:42 AEST some of the below documentation is now out-of-date and will be updated soon as well as the landing page salty.im


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

  • You need a POSIX Shell, e.g: /bin/sh
    • You also need jq installed (the script uses this to parse the JSON from Discovery requests)
  • msgbus
  • salty

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

export MSGBUS_URI=https://msgbus.<yourdomain>
$ ./salty-chat read &
$ ./salty-chat chat prologic@mills.io

NB: You need to ensure you have a valid msgbus Endpoint for salt-chat to work. See Endpoint for details.

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"

Inbox

To ensure you are reading from your own Inbox by default use: export SALTY_INBOX="username"

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!)

Point an environment variable called MSGBUS_URI to your msgbus instance.

Example:

export MSGBUS_URI=https://msgbus.mills.io

NB: You are welcome to use my (James Mills) msgbus instance above but 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

Start a Chat

$ ./salty-chat chat prologic@mills.io
>

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

Infrastructure Setup:

  • As mentioned earlier you will need a static site generator or webserver to serve your .well-known json file. This can be setup in numerous ways, but we will be providing bootstrapping instructions in the infrastructure folder.
  • You'll also need to use a msgbus to make this work as it brokers the encrypted payload between users on SaltyIm. This will also live in infrastructure

License

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