Chuck Carroll


How to Use Signal Messenger from the Terminal with scli

Published: 2024-7-26

Having a CLI fetish, I saw that there's a terminal user interface for Signal messenger, so naturally I need to try it out. scli is a TUI program written in python and uses signal-cli and it's a pretty cool project.

To use scli, install signal-cli and scli. If you're using an Arch-based distribution, both are available in the AUR as signal-cli and scli-git.

Before running scli, signal-cli needs to register with the signal servers either by registering a new device or linking with an already registered device. In this example, I'll be linking scli with my phone by running scli link. This will bring up a QR code that you need to scan with the Signal app on the phone by going to menu > Settings > Linked devices > Link a new device. Once the QR code is scanned, there will be a few messages displayed in the terminal. After about a minute, it will complete.

Now verify the setup by running signal-cli -u [USERNAME] receive where USERNAME is the phone number you have used starting with the "+" sign followed by the country calling code. Once you receive the sync message, then run signal-cli -u [USERNAME] daemon. If you don't receive any error messages, hit CTRL+C or CTRL+ALT+C to cancel.

Now you can run scli in the terminal. If you've used vim, the keybindings should be familiar. Hitting "tab" will switch between the thread panel and the message panel. Selecting a message and pressing "e" will bring up reaction emojis. To attach, for example, and image, video, etc, type :a /path/to/source in the message box. "D" deletes the message for everyone, "i" shows message details. There are several other useful keybindings that I won't list, but F1 brings up the help screen.

To exit, press CTRL+C or CTRL+ALT+C. Conversation history will be wiped after the program is closed, but history can be enabled by running scli --save-history or scli -s. This will need to be run every time scli is ran. You can also enable notifications by using the -n flag as well. To avoid running scli -s -n every time you want to run scli, you can either set up the bash alias alias signal='scli -s -n' or you can create the config ~.configs/sclirc.I added the lines enable notifications = true and save-history = true. Another important note when storing history, the file will be saved in plain text to ~/.local/share/scli/history by default.

As impressive as scli and signal-cli are, there are some drawbacks. You cannot send or receive voice or video calls. It also does not send "read" receipts for received messages. And it's not as easy to send and receive voice messages. I don't intend on uninstalling the official Signal desktop app yet, though I intend to primarily use scli and run Signal desktop for regular calls.

Thanks for reading. Feel free to send comments, questions, or recommendations to hey@chuck.is.