explaingit

asamk/signal-cli

4,557JavaAudience · ops devopsComplexity · 3/5LicenseSetup · moderate

TLDR

A command-line tool that lets you send and receive Signal encrypted messages from a terminal or server script without opening any graphical app, ideal for automated server notifications.

Mindmap

mindmap
  root((signal-cli))
    What it does
      Send Signal messages
      Receive messages
      Daemon mode
    Interfaces
      JSON-RPC
      D-Bus
      Command line
    Use Cases
      Server alerts
      Cron job alerts
      Script integration
    Platforms
      Linux
      macOS
      Windows
      Docker
    Tech
      Java
      Signal library
      GPLv3
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Set up automated server alerts that send Signal messages when your monitoring system detects a problem.

USE CASE 2

Integrate Signal messaging into shell scripts or cron jobs using the JSON-RPC or D-Bus interface.

USE CASE 3

Send Signal messages from the command line on Linux, macOS, or Windows using a registered phone number.

USE CASE 4

Run signal-cli as a background daemon to receive and respond to Signal messages programmatically.

Tech stack

Java

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Java 25 or higher and a phone number to register with Signal via SMS verification.

Free to use and modify under GPLv3, but any distributed version must also be released under GPLv3.

In plain English

signal-cli is an unofficial command-line interface for the Signal messaging app. Signal is an encrypted messaging service normally used through its smartphone or desktop apps, but this project lets you send and receive Signal messages from a terminal or from a server script, without opening any graphical application. The main intended use case is server automation. For example, a server administrator might want their monitoring system to send them a Signal message when something goes wrong. For that purpose, signal-cli can run as a background daemon that accepts commands through a JSON-RPC interface (a standard way for programs to call functions over a network connection) or a D-Bus interface (a standard way for programs on Linux to communicate with each other locally). This makes it possible to integrate Signal messaging into scripts, cron jobs, or other automated systems. Using it requires a phone number, since Signal accounts are tied to phone numbers. You register that number with the tool (receiving a verification code by SMS or voice call), and after that you can send messages from the command line with a single command. Messages can also be piped in from other programs, so for example the output of a system status command can be sent directly as a Signal message. Installation is available as a pre-built binary for Linux, macOS, and Windows, or as a community-maintained Docker image. It requires Java 25 or higher. The project is built on top of the same underlying Signal library used by the Android app, patched to work as a standalone library. One important maintenance note from the README: Signal releases can expire after roughly three months if the underlying Signal server changes its protocol. This means signal-cli versions older than three months may stop working and need to be updated. The project is licensed under the GPLv3 open-source license.

Copy-paste prompts

Prompt 1
Walk me through registering a phone number with signal-cli on Linux and sending my first test message.
Prompt 2
How do I run signal-cli as a background daemon and call it from a Python script via JSON-RPC?
Prompt 3
Write a bash script that pipes the output of a server disk-space check into a Signal message using signal-cli.
Prompt 4
How do I use signal-cli with D-Bus on Linux to trigger a local action whenever I receive a Signal message?
Prompt 5
What is the update procedure for signal-cli when it expires after three months due to a Signal protocol change?
Open on GitHub → Explain another repo

← asamk on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.