Skip to content

rainerigius/SignalGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

SignalGPT

Chat with AI on Signal

Definition

SignalGPT is a Python bot that connects Signal messaging with DeepSeek's AI API, allowing you to get AI responses directly in your Signal conversations.

Features ✨

  • Receive Signal messages and respond with AI-generated answers
  • Automatic timestamp tracking to avoid duplicate responses
  • Profile picture changes to indicate online/offline status
  • Conversation logging for debugging and record-keeping
  • Simple setup with Signal's command-line interface
  • Linux / Windows support in one file (changing OSCHOICE variable)

Prerequisites 📋

  • Python 3.7+
  • Java Runtime Environment (JRE) 17+ (required for signal-cli)
  • A Signal account with phone number verification
  • DeepSeek API key

Installation Guide 🛠️

1. Clone the repository

git clone https://github.com/rainerigius/SignalGPT.git
cd SignalGPT

2. Install Python dependencies

pip install requests

3. Set up signal-cli

  1. Download signal-cli 0.13.13 from the official releases:

    wget https://github.com/AsamK/signal-cli/releases/download/v0.13.13/signal-cli-0.13.13.tar.gz

    Or download manually from:
    https://github.com/AsamK/signal-cli/releases/tag/v0.13.13

  2. Extract the archive:

    tar -xzf signal-cli-0.13.13.tar.gz
  3. Rename the extracted folder:

    mv signal-cli-0.13.13 signal-cli

4. Configure the bot

Edit the following variables in the script:

MY_NUMBER = "+1234567890"  # Your Signal-registered phone number
DEEPSEEK_API_KEY = "your_deepseek_api_key"  # Your DeepSeek API key
DEEPSEEK_MODEL = "deepseek-chat" # or "deepseek-reasoner" for better performance but slower response time
OSCHOICE = "Windows" # Change to "Windows" if running on Windows

You have to create your own red.png and green.png files.

How It Works ⚙️

  1. Message Reception:

    • The bot continuously checks for new Signal messages using signal-cli
    • Messages are parsed and filtered to avoid duplicates
  2. AI Processing:

    • Valid messages are sent to DeepSeek's API
    • Responses are sanitized to work with Signal's formatting
  3. Message Sending:

    • AI responses are sent back to the original sender
    • All interactions are logged for reference
  4. Status Indicators:

    • Profile picture changes to green.png when online
    • Changes to red.png when shutting down

First Run Setup 🚀

  1. Run the script:

    python signalgpt.py
  2. If this is your first time:

    • The bot will attempt to register your phone number
    • You'll receive an SMS verification code
    • Enter the code when prompted
  3. The bot will then:

    • Start listening for messages
    • Change its profile picture to indicate it's online

Usage 💬

  1. Simply send a message to your bot's number from any Signal client
  2. The bot will respond with AI-generated content
  3. All conversations are logged in response_log.txt

Complete File Structure 📂

SignalGPT/
├── signal-cli/            # Signal CLI binaries
├── signalgpt.py           # Main bot script
├── last_message.txt       # Stores last processed timestamp
├── response_log.txt       # Conversation history
├── green.png              # Online status avatar
└── red.png                # Offline status avatar

Customization 🎨

You can modify:

  • AVATAR_ONLINE/AVATAR_OFFLINE - Change status indicator images
  • System prompt in get_deepseek_response() - Adjust AI behavior
  • sanitize_text() - Modify how messages are cleaned before sending

Troubleshooting 🐛

Problem: "Error on bin/signal-cli.bat or bin/signal-cli"
Solution: Check the OSCHOICE variable and restart the bot

Problem: "Signal number not registered"
Solution: Delete the signal-cli/data folder and restart the bot

Problem: Messages not being received
Solution: Check your internet connection and verify signal-cli is working:

Windows

./signal-cli/bin/signal-cli.bat -a YOUR_NUMBER receive

Linux

./signal-cli/bin/signal-cli -a YOUR_NUMBER receive

Problem: API errors
Solution: Verify your DeepSeek API key and quota

Security Note 🔒

  • Your DeepSeek API key is stored in plaintext - keep it secure
  • Signal credentials are stored in signal-cli/data - protect this directory
  • Consider using environment variables for sensitive data

License 📜

MIT License - Free for personal and educational use

About

Chat with AI on Signal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages