a TUI for signal messenger, written in Go

siggo

GoDoc Go Report Build

A terminal ui for signal-cli, written in Go.

Alt text

Features

  • vim-style ux
  • useful for quick messages or use $EDITOR to compose fancy ones
  • emoji support, just use colons, like :cat: or the kitty emoji picker
  • configurable contact colors
  • can use fzf to fuzzy-find files to attach
  • support for groups! (but not creating new groups)
  • quickly filter messages by providing a regex pattern

Dependencies

siggo uses the dbus daemon feature of signal-cli, so libunixsocket-java (Debian), libmatthew-java (Fedora) or libmatthew-unix-java (AUR) is required. There seems to be a brew forumla for dbus on MacOS.

Install signal-cli and put it somewhere safe in your path. You will need to follow its instructions to either link or register your device. The siggo link <phonenumber> <devicename> subcommand has been added to make linking more user-friendly, but has not been tested sufficiently. Be sure to prefix with + and country code (for example +12345678901).

When setup is finished, you should be able to run without error:

signal-cli -u +<yourphonenumber> receive --json

You are now ready to use siggo.

Security

siggo shells out to signal-cli, so if that worries you, don't use it, for now. I have lofty goals of eventually replacing this with libsignal.

Build

siggo should build on Linux or MacOS, but has primarily been tested on Linux.

make build

Run

bin/siggo

Updating

If you are updating from a previous version, I recommend deleting your conversation files first. See below.

Keybinds

  • j - Scroll Down
  • k - Scroll Up
  • J - Next Contact
  • K - Previous Contact
  • a - Attach file (sent with next message)
  • A - Use fzf to attach a file
  • / - Filter conversation by providing a pattern
  • i - Insert Mode
    • CTRL+L - Clear input field (also clears staged attachments)
  • I - Compose (opens $EDITOR and lets you make a fancy message)
  • y - Yank Mode
    • yy - Yank Last Message (from current conversation)
    • yl - Yank Last URL
  • o - Open Mode
    • Enter - Open selected attachment
    • oo - Open Last Attachment
  • l - Link Mode
    • Enter - Open selected link in browser
    • ll - Open Last URL
    • y - Yank selected link to clipboard
  • p or CTRL+V - Paste text/attach file in clipboard
  • ESC - Normal Mode
  • CTRL+N - Move to next conversation with unread messages
  • CTRL+Q - Quit (CTRL+C should also work)

Configuration

See the configuration README here.

Message History

Message saving is an opt-in feature.

If you enable it, conversations are stored in plain text in ~/.local/share/siggo/conversations.

Delete them like this:

rm ~/.local/share/siggo/conversations/*

Troubleshooting

I've started a wiki here.

Development

Honestly the code is a hot mess right now, and I don't recommend trying to contribute yet. But I will absolutely take a PR if you want to throw one at me.

If you save the output of signal-cli like so:

signal-cli -u +<yourphonenumber> receive --json > example_messages.json

You can then run siggo using it as mock input. This is useful for development and testing.

bin/siggo -m example_messages.json

This way you can test without sending yourself messages.

Similar Projects / Inspiration

Roadmap

Here is a list of things that are currently broken.

  • Send read receipts for incoming messages (signal-cli limitation, but might be fixed soon)

Here is a list of features I'd like to add soonish.

  • Better Attachments Support
    • signal-cli seems to delete old attachments after a while. maybe I should move them somewhere where they wont get deleted?
  • default color list for contacts instead of white
  • better mode indication
  • gui configuration
    • colors and border styles
  • let user re-sort contact list (for example alphabetically)
  • command to go to contact with fuzzy matching
  • use dbus to send instead of signal-cli, to avoid having to spin up the JVM
  • there is still some data that I'm dropping on the floor (I believe it to be the "typing indicator" messages)
  • weechat/BitlBee plugin that uses the siggo model without the UI
  • wouldn't tests be neat?
Owner
Derric Williams
Like the other guys, only moreso.
Derric Williams
Comments
  • Siggo TUI empty on startup

    Siggo TUI empty on startup

    Problem: when I start siggo, I get an empty TUI.

    Here is the log file:

    time="2020-11-22T20:11:22+01:00" level=warning msg="failed to read contacts from disk: json: cannot unmarshal string into Go struct field SignalGroup.groupStore.groups.members of type signal.SignalGroupMember"
    time="2020-11-22T20:11:22+01:00" level=debug msg="contacts found: []"
    time="2020-11-22T20:11:22+01:00" level=info msg="starting dbus daemon..."
    time="2020-11-22T20:11:22+01:00" level=info msg="scanning stdout"
    time="2020-11-22T20:11:25+01:00" level=info msg="starting dbus daemon..."
    time="2020-11-22T20:11:25+01:00" level=info msg="scanning stdout"
    time="2020-11-22T20:11:27+01:00" level=info msg="starting dbus daemon..."
    time="2020-11-22T20:11:27+01:00" level=info msg="scanning stdout"
    time="2020-11-22T20:11:28+01:00" level=debug msg="Key Event <NORMAL>: 256 mods: 0 rune: 113"
    time="2020-11-22T20:11:28+01:00" level=debug msg="Key Event <NORMAL>: 24 mods: 2 rune: 24"
    time="2020-11-22T20:11:28+01:00" level=debug msg="Key Event <NORMAL>: 3 mods: 2 rune: 3"
    time="2020-11-22T20:11:28+01:00" level=debug msg="killing signal-cli daemon..."
    

    I can confirm signal-cli works, as I can receive messages using the cli. Moreover, I can send messages through signal-cli.

    Am I doing something wrong, or did I find a bug?

  • siggo 0.9.0. on FreeBSD slightly broken interface

    siggo 0.9.0. on FreeBSD slightly broken interface

    Hello, Basically, my siggo now looks like this, any idea where should I start troubleshooting? The area where my contacts are present makes the adjacent text field shifted by one character to the left, which makes the text field corrupted. Some random characters appear there, which nobody typed, the borders are shifted, etc, see picture. Running on FreeBSD 12.2-p4, I rebuilt siggo from source again just to be sure, the issue is there.

    scrot-21-0408-20:32:03

  • Crashed when first opened

    Crashed when first opened

    A couple messages displayed after loading for the first time, then it crashed.

    panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    	panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x5591d4df4254]
    
    goroutine 1 [running]:
    github.com/rivo/tview.(*Application).Run.func1(0xc0002d8000)
    	github.com/rivo/[email protected]/application.go:244 +0x87
    panic(0x5591d4feb900, 0x5591d524dc10)
    	runtime/panic.go:969 +0x1b9
    github.com/derricw/siggo/widgets.(*ContactListPanel).Render(0xc0001cce00)
    	github.com/derricw/siggo/widgets/contactlist.go:73 +0x494
    github.com/derricw/siggo/widgets.(*ChatWindow).update(0xc0002b8750)
    	github.com/derricw/siggo/widgets/chatwindow.go:424 +0x69
    github.com/derricw/siggo/widgets.NewChatWindow.func3.1()
    	github.com/derricw/siggo/widgets/chatwindow.go:640 +0x2c
    github.com/rivo/tview.(*Application).QueueUpdateDraw.func1()
    	github.com/rivo/[email protected]/application.go:716 +0x31
    github.com/rivo/tview.(*Application).Run(0xc0002d8000, 0x0, 0x0)
    	github.com/rivo/[email protected]/application.go:371 +0x9a7
    github.com/derricw/siggo/cmd.glob..func10(0x5591d5255180, 0x5591d52aac58, 0x0, 0x0)
    	github.com/derricw/siggo/cmd/root.go:121 +0x45a
    github.com/spf13/cobra.(*Command).execute(0x5591d5255180, 0xc0000121d0, 0x0, 0x0, 0x5591d5255180, 0xc0000121d0)
    	github.com/spf13/[email protected]/command.go:842 +0x2c2
    github.com/spf13/cobra.(*Command).ExecuteC(0x5591d5255180, 0x5591d4a4c625, 0xc000072058, 0x0)
    	github.com/spf13/[email protected]/command.go:943 +0x336
    github.com/spf13/cobra.(*Command).Execute(...)
    	github.com/spf13/[email protected]/command.go:883
    github.com/derricw/siggo/cmd.Execute()
    	github.com/derricw/siggo/cmd/root.go:131 +0x2f
    main.main()
    	github.com/derricw/siggo/main.go:8 +0x25
    

    May I suggest using cview instead of tview? I used it personally and it's great, and it has numerous improvements over the original.

  • Panic when starting siggo

    Panic when starting siggo

    I've just linked siggo, and am running into an immediate panic when trying to run it:

    $ siggo
    
    panic: no conversation for current contact
    
    goroutine 1 [running]:
    github.com/derricw/siggo/widgets.(*ChatWindow).update(0xc0002b8630)
    	github.com/derricw/siggo/widgets/chatwindow.go:457 +0xbe
    github.com/derricw/siggo/widgets.NewChatWindow(0xc00006c8c0, 0xc0001a8380, 0xc000062ba0)
    	github.com/derricw/siggo/widgets/chatwindow.go:696 +0x93e
    github.com/derricw/siggo/cmd.glob..func10(0x55d14ad71180, 0x55d14adc71f0, 0x0, 0x0)
    	github.com/derricw/siggo/cmd/root.go:95 +0x24d
    github.com/spf13/cobra.(*Command).execute(0x55d14ad71180, 0xc0000121d0, 0x0, 0x0, 0x55d14ad71180, 0xc0000121d0)
    	github.com/spf13/[email protected]/command.go:842 +0x2c2
    github.com/spf13/cobra.(*Command).ExecuteC(0x55d14ad71180, 0x55d14a571625, 0xc00006e058, 0x0)
    	github.com/spf13/[email protected]/command.go:943 +0x336
    github.com/spf13/cobra.(*Command).Execute(...)
    	github.com/spf13/[email protected]/command.go:883
    github.com/derricw/siggo/cmd.Execute()
    	github.com/derricw/siggo/cmd/root.go:119 +0x2f
    main.main()
    	github.com/derricw/siggo/main.go:8 +0x25
    

    My config is the default:

    $ cat ~/.config/siggo/config.yml
    
    user_number: "+elided"
    user_name: self
    save_messages: false
    desktop_notifications: false
    desktop_notifications_show_message: false
    desktop_notifications_show_avatar: false
    terminal_bell_notifications: false
    max_coversation_length: 0
    hide_panel_titles: false
    hide_phone_numbers: false
    contact_colors: {}
    contact_aliases: {}
    log_file: ""
    

    but with my phone number instead of elided.

    I don't really understand the signal protocol, but I've been running signal-desktop on a separate machine using signal-cli to register everything in the first place. This machine is now linked to that instance of signal-cli.

  • Exit status 1 when trying to send messages in signal

    Exit status 1 when trying to send messages in signal

    Hello! Currently whenever I try to send a message in siggo it gives me exit status 1 and I can't currently find very much information on what is going on. Are there any log files being written? I have linked my account using signal-cli and am able to send messages using signal-cli but the siggo sending doesn't work. I'm also able to see my contacts on siggo as well, just seems the message sending is broken for me. I'm on Artix linux and don't have systemd, not sure if that makes a difference. Thanks for the help!

  • `Go get` fails

    `Go get` fails

    Hello,

    I just wanted to install siggo but the go get command fails:

    go get github.com/derricw/siggo
    # github.com/derricw/siggo/cmd
    .go/src/github.com/derricw/siggo/cmd/cfg.go:83:13: constant -1 overflows tcell.Color
    
  • MacOS Support

    MacOS Support

    siggo does not build on MacOS (and OpenBSD) because of this:

    https://github.com/derricw/siggo/blob/master/signal/signal.go#L192

    The Pdeathsig attribute is only available on Linux.

    See: https://golang.org/pkg/syscall/#SysProcAttr

    The purpose of this section is to ensure that we don't leave behind an orphaned signal-cli daemon if siggo is killed or panics or otherwise fails to handle a shutdown gracefully.

    If we want siggo to build for MacOS we will need to find more platform-independent way to do this.

  • Use XDG directories

    Use XDG directories

    I would be nice if siggo used the XDG directories for storing data and configs, instead of dumping it straight to home.

    https://wiki.archlinux.org/index.php/XDG_Base_Directory

  • Support for Signals

    Support for Signals "New Groups"

    There is a new group system in Signal with has features like admins and mentions. Signal currently asks all groups to update to the new system, which leads into me being removed from these groups for using siggo, since its not compatible. Would be nice to add these new group features

  • Add support for attaching content in clipboard

    Add support for attaching content in clipboard

    This adds a feature that when in normal mode, pressing p or CTRL+V will paste the current text from clipboard, or if it's file (such as an image) it will attach it to the message.

    A limitation with this solution is that attached files will be stored in a temporary file, so they are not persisant. I'm open for suggestions on a better way to store them.

    Also, I wasn't able to bind CTRL+Shift+V in normal mode, but I think this paste method should be used there as well.

  • signal-cli 0.8.2 breaks contacts list

    signal-cli 0.8.2 breaks contacts list

    signal-cli removed its contact list to a new location in XDG_DATA_HOME/signal-cli (or at least is no longer available in the old location).

    Until we deal with this, siggo will be unable to load contacts at startup for signal-cli >= 0.8.2

  • Empty UI

    Empty UI

    When I start siggo, I just get an empty UI without any further messages. I used siggo link to link the device and can retrieve the JSON data successfully. I'm running Arch Linux:

    $ java --version
    openjdk 18.0.1.1 2022-04-22
    OpenJDK Runtime Environment (build 18.0.1.1+2)
    OpenJDK 64-Bit Server VM (build 18.0.1.1+2, mixed mode)
    $ uname -a
    Linux applecore 5.18.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 29 Jun 2022 23:03:08 +0000 x86_64 GNU/Linux
    
  • conversations missing in siggo

    conversations missing in siggo

    my siggo tends to always open without memory of conversations making software quite unusable even i have set to save these recipients-stores in config file.

    save_messages: true
    
    -> % siggo conv lol
    WARN[0000] failed to read contacts from disk: open /home/satoshi/.local/share/signal-cli/data/+573292314943.d/recipients-store: no such file or directory
    FATA[0000] failed to find conversation 
    

    correct folder location would be 630010.d

    satoshi@xiaomi13 [04:44:01] [~/.local/share/signal-cli/data]
    -> % ls
    630010  630010.d  accounts.json
    
  • Colors get messed up, when leaving and re-entering the main interface

    Colors get messed up, when leaving and re-entering the main interface

    When I leave the main interface (e.g. for fuzzy contact selection or editing), the colors are set to black/white instead of the terminal palette.

    Before:

    image

    After:

    image

  • exit status 2

    exit status 2

    I just set up signal-cli and siggo on my ubuntu server to try it out. This is pretty awesome thank you.

    Signal on my iPhone is the primary account. I added my signal-cli user with

    signal link -n myname | tee >(xargs -L 1 qrencode -t utf8)
    

    So I see this status message sometimes when I try to send a message, it seems like the flow is:

    1. Open siggo after it being stopped
    2. Send a message
    3. See exit status 2, the message also doesn't send and is removed from the chat
    4. Open Signal on my iPhone, send a message
    5. Wait for message to show up in siggo
    6. Once it shows up in siggo then I can send messages and it all seems to work fine. Eventually the chat will sync up but that can take a bit
    • Any idea if this is a normal behavior for starting up siggo?
    • Should I be doing something to run this as a daemon or in screen so that I don't need to start/stop siggo ?

    I enabled debug mode but this didn't seem too helpful

    time="2022-01-08T15:48:44-08:00" level=info msg="starting dbus daemon..."
    time="2022-01-08T15:48:44-08:00" level=info msg="scanning stdout"
    time="2022-01-08T15:48:46-08:00" level=error msg="exit status 2"
    time="2022-01-08T15:48:46-08:00" level=debug msg="updating contact panel..."
    
  • Read Receipts / Typing Indicators - Feature Request

    Read Receipts / Typing Indicators - Feature Request

    is it possible to enable Read receipts? when i receive a message the recipent can't see i've read their messages. if so how? also is it possible to enable typing indicators so that the recipient will see if im typing a mesg? thank you

  • Building on FreeBSD

    Building on FreeBSD

    Hi, I am trying to build on FreeBSD (using gmake):

    gmake build gives

    github.com/godbus/dbus/v5
    # github.com/godbus/dbus/v5
    In file included from ../../go/pkg/mod/github.com/godbus/dbus/[email protected]/transport_unixcred_freebsd.go:13:
    In file included from /usr/include/sys/ucred.h:39:
    /usr/include/sys/_lock.h:38:2: error: unknown type name 'u_int'
            u_int   lo_flags;
            ^
    /usr/include/sys/_lock.h:39:2: error: unknown type name 'u_int'
            u_int   lo_data;                /* General class specific data. */
            ^
    In file included from ../../go/pkg/mod/github.com/godbus/dbus/[email protected]/transport_unixcred_freebsd.go:13:
    In file included from /usr/include/sys/ucred.h:40:
    /usr/include/sys/_mutex.h:49:11: error: unknown type name 'uintptr_t'
            volatile uintptr_t      mtx_lock;       /* Owner and flags. */
                     ^
    /usr/include/sys/_mutex.h:63:11: error: unknown type name 'uintptr_t'
            volatile uintptr_t      mtx_lock;       /* Owner and flags. */
                     ^
    4 errors generated.
    gmake: *** [Makefile:28: build] Error 2
    
TUI process monitor written in Go
TUI process monitor written in Go

pst This is TUI process monitor written in Go. Features Monitor process's list, info, tree, open files, Kill process Support OS Mac Linux Requirements

Nov 25, 2022
Light weight Terminal User Interface (TUI) to pick material colors written by Go.
Light weight Terminal User Interface (TUI) to pick material colors written by Go.

mcpick Light weight Terminal User Interface (TUI) to pick material colors. You do NOT need to take your hands off the keyboard to pick colors. Getting

Dec 27, 2022
💼 CLI / TUI for Pocket
💼 CLI / TUI for Pocket

gocket A simple CLI (or TUI) for Pocket. Read your Pocket goodies from your comfy shell. Archive or delete multiple entries easily. Use a TUI or pipe

Aug 9, 2022
A CLI / TUI for Microsoft Teams
A CLI / TUI for Microsoft Teams

teams-cli A Command Line Interface (or TUI) to interact with Microsoft Teams Status The CLI only let you log-in and fetches your user and conversation

Dec 22, 2022
A powerful little TUI framework 🏗
A powerful little TUI framework 🏗

Bubble Tea The fun, functional and stateful way to build terminal apps. A Go framework based on The Elm Architecture. Bubble Tea is well-suited for si

Dec 27, 2022
Canard. A command line TUI client for the journalist RSS aggregator.
Canard. A command line TUI client for the journalist RSS aggregator.

Canard Canard. A command line TUI client for the Journalist RSS aggregator. Installation Download a binary from the releases page. Or build it yoursel

Jan 6, 2023
🧭 TUI for command navigation
🧭 TUI for command navigation

devgo a command-line launcher Install latest version curl -o- https://raw.githubusercontent.com/TheWinds/devgo/main/install.sh | bash special version

Apr 19, 2022
A terminal UI (TUI) for HashiCorp Nomad
A terminal UI (TUI) for HashiCorp Nomad

Damon - A terminal Dashboard for HashiCorp Nomad Damon is a terminal user interface (TUI) for Nomad. It provides functionality to observe and interact

Jan 6, 2023
A TUI multitool for day-to-day operations for software applications.

Bench (WIP) A TUI multitool for day-to-day operations for software applications. Lets you do common operations needed during IT work that are common e

Dec 5, 2021
🦜 Navigate github repos in a tui

goh Navigate github repos in a tui Why I am constantly refering to my github repos and repos from others for code snippets that are relevant to what I

Dec 10, 2021
A tui for playing media from a caddy fileserver

kwatch a little tui interface to play media from a caddy fileserver. options: -a: server address -u: server http username -p: server http password -o:

Aug 9, 2022
TUI Flappy Bird. It‘s a lil bit jank tbh

EBIRD TUI Flappy Bird. It's a lil bit jank tbh. Build and Install Build dependen

Dec 22, 2021
Tabouli: a TUI for interacting with firmware/embedded devices that support a CLI via serial interface/virtual COM Port
Tabouli: a TUI for interacting with firmware/embedded devices that support a CLI via serial interface/virtual COM Port

Tabouli Information Tabouli is a TUI for interacting with firmware/embedded devi

Apr 2, 2022
A TUI implementation of the popular word quiz wordle!

gordle A TUI implementation of the popular word quiz Wordle! Building Build the cli command: $ go build ./cmd/cli <Empty output on build success> Buil

Dec 21, 2022
Podman-tui - A Terminal User Interface to interact with the podman (v3.x)
Podman-tui - A Terminal User Interface to interact with the podman (v3.x)

podman-tui podman-tui is a Terminal User Interface to interact with the podman (

Dec 23, 2022
The Cloud Aviator: TUI client for cloud services (AWS, Vultr, Heroku, Render.com, ...)
The Cloud Aviator: TUI client for cloud services (AWS, Vultr, Heroku, Render.com, ...)

=== T H E C L O U D A V I A T O R === ⠀⠀⠀⠀⠀⠀⠀⠀⢶⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Dec 17, 2022
bash completion written in go + bash completion for go command

complete Package complete is everything for bash completion and Go. The main development is done on the master branch, please follow the link to see a

Dec 20, 2022
Command line tool for Google Cloud Datastore, written in Go
Command line tool for Google Cloud Datastore, written in Go

dsio dsio is a command line tool for Google Cloud Datastore. This tool is under development. Please use in your own risk. Features Bulk upsert entitie

Feb 8, 2022
A Passwordgenerator written in Go

Important! This repository is abandoned. The current development is happening in https://github.com/luther9/GoPasswordCreator. GoPasswordCreator This

Apr 2, 2022