TurboBot is a Python Signal bot that runs against the signal-cli REST API. It routes messages through dynamically discovered handlers in handlers/, supports hashtag commands such as #gpt, and can return text plus base64-encoded attachments.
- Architecture: runtime flow, dispatch, handler discovery, and important paths.
- Configuration: required environment variables and
secret.txtsetup. - Local Development: WSL/Codex bootstrap, local run, and mocked test workflow.
- Operations: Docker Compose services, bootstrap flow, auto-updates, and Signal linking.
- Writing handlers: how to add new bot features.
- GPT function tools: how to add tools callable by the
#gpthandler. - Testing: local test commands, mocks, and integration-test caveats.
- Signal API menu: interactive helper for common signal-cli REST API commands.
- README migration checklist: where the original README content moved and why no setup guidance was dropped.
-
Start the Docker Compose stack.
-
Link
signal-clito a Signal account/device if this is the first run. -
Copy the sample secret file and edit it with real values:
cp secret.example.txt secret.txt
-
Configure at least:
export SIGNAL_API_URL="signal-cli:8181" export BOT_NUMBER="+15555555555" export CONTACT_NUMBERS="+15555555555" export GROUP_NAMES="My Signal Group"
See Configuration for all supported variables.
When you first run this, start signal-cli and link it to your account by scanning a QR code with your phone. With the REST API exposed locally, the QR-code endpoint is typically:
http://localhost:8181/v1/qrcodelink?device_name=local
See Operations for more deployment details.
For WSL/Codex local development, use the checked-in bootstrap scripts so the host environment is built from the same files the containers use:
git submodule update --init --recursive
scripts/bootstrap_wsl.sh
scripts/test_local.shThis workflow uses:
requirements.txtfor Python dependenciespkglistfor system packages
See Local Development for the full WSL workflow and Testing for test notes.
Some handlers require system packages, especially ffmpeg. Docker deployments install packages from pkglist, and the WSL bootstrap script installs from the same file.
If you need to reproduce a running signal-cli container manually, stop the existing instance first and adapt this example to your local volume paths:
docker run --env "MODE=json-rpc" --env "PORT=8181" --env "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" --env "GIN_MODE=release" --env "BUILD_VERSION=0.90" --env "SIGNAL_CLI_CONFIG_DIR=/home/.local/share/signal-cli" --env "SIGNAL_CLI_UID=1000" --env "SIGNAL_CLI_GID=1000" --entrypoint "/entrypoint.sh" --volume "/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/volumes/app-1_signal-cli-data/_data:/home/.local/share/signal-cli" bbernhard/signal-cli-rest-api:latest