Tired of replying to your Signal messages? Let GPT-3 take care of it.
This repository is based on René Filip's signalbot, and bbernhard's Signal CLI REST Api
To run, please make sure that you have Python 3.9, and docker installed. To install the dependencies run
pip install poetry
poetry install- Create a directory for the configuration. This allows you to update signal-cli-rest-api by just deleting and recreating the container without the need to re-register your signal number
export SIGNAL_CLI=$HOME/.local/share/signal-cli
mkdir $SIGNAL_CLI
- Now ramp up the the REST API and register our Signal Number.
docker run --restart=always -p 8080:8080 \
-v $SIGNAL_CLI:/home/.local/share/signal-cli \
-e 'MODE=native' bbernhard/signal-cli-rest-apiOpen http://localhost:8080/v1/qrcodelink?device_name=signal-api in your browser, open Signal on your mobile phone, go to Settings > Linked devices and scan the QR code using the + button.
- Restart the server in
json-rpcmode.
docker run --restart=always -p 8080:8080 \
-v $SIGNAL_CLI:/home/.local/share/signal-cli \
-e 'MODE=json-rpc' bbernhard/signal-cli-rest-apiAs soon as the logs show time="2022-12-23T17:30:03Z" level=info msg="Started Signal Messenger REST API" the API is started successfully.
- Now that the API has started, we can start the bot by running
poetry run python bot.py --service 127.0.0.1:8080 --phone_number <Your-Phone-Number>
Note: Per default the bot will listen, and reply to all messages. If you want the bot to reply only to specific groups you can pass the --groups argument when running the script. This argument accepts a list of group names.
