Matrix BibleBot
A Matrix bot that fetches Bible verses and shares them in chat rooms. Simply send a Bible reference like "John 3:16" as a message and the bot will respond with the verse text.
What it does
Input: John 3:16 esv
Output:
For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life. - John 3:16 🕊️✝️
The bot supports both KJV (default) and ESV translations, works in encrypted rooms, and can split long passages into multiple messages.
Quick Start
-
Install the bot
pipx install matrix-biblebot
-
Authenticate with Matrix
biblebot auth login
-
Generate and edit config
biblebot config generate
Then edit
~/.config/matrix-biblebot/config.yamlto add your room IDs. -
Run the bot
biblebot
-
Invite the bot to your Matrix rooms and start sending Bible references!
Features
- 📖 Bible Translations: KJV (default) and ESV support
- 🔒 End-to-End Encryption: Works in encrypted Matrix rooms
- ✂️ Smart Message Splitting: Long passages split intelligently
- 🚀 Production Ready: Rate limiting, error handling, systemd service
- 🎯 Direct-Only Triggers: Responds only when the entire message is a scripture reference
Installation
Recommended: pipx
# Basic installation
pipx install matrix-biblebot
# With end-to-end encryption support
pipx install 'matrix-biblebot[e2e]'
# Windows PowerShell: pipx install "matrix-biblebot[e2e]"
Alternative: pip
pip install matrix-biblebot
# or with E2EE support
pip install 'matrix-biblebot[e2e]'
# Windows PowerShell: pip install "matrix-biblebot[e2e]"
From Source
git clone https://github.com/jeremiah-k/matrix-biblebot.git
cd matrix-biblebot
pip install '.[e2e]' # Includes E2EE support
Usage
Supported Reference Formats
The bot understands various Bible reference formats:
| Format | Example | Description |
|---|---|---|
| Single verse | John 3:16 |
Gets one verse (KJV default) |
| Verse range | 1 Cor 15:1-4 |
Gets multiple verses |
| Whole chapter | Psalm 23 |
Gets entire chapter |
| With translation | John 3:16 esv |
Specify ESV or KJV |
| Abbreviations | jn 3:16, 1co 15:1-4 |
Short book names work |
Supported Translations
- KJV (King James Version) - Default, no setup required
- ESV (English Standard Version) - Requires free API key from api.esv.org
Book Abbreviations
The bot recognizes many abbreviations: gen (Genesis), exo (Exodus), matt (Matthew), jn (John), 1co (1 Corinthians), rev (Revelation), and many more. See full list.
Reference Detection
The bot responds only when a message is entirely a scripture reference.
| Should trigger | Example |
|---|---|
| Single verse | John 3:16 |
| Verse range | 1 Cor 15:1-4 |
| Whole chapter | Psalm 23 |
| With translation | Romans 8:28 ESV |
| Should NOT trigger | Example |
|---|---|
| Prefix command | !bible John 3:16 |
| Mention | @bot Psalm 23 |
| Embedded in text | I like John 3:16 |
Bot Response
When you send a Bible reference, the bot will:
- Add a ✅ reaction to your message
- Reply with the verse text formatted like:
"Verse text - Reference 🕊️✝️"
Configuration
Basic Setup
-
Authenticate with Matrix
biblebot auth login
-
Generate configuration file
biblebot config generate
-
Edit the config file at
~/.config/matrix-biblebot/config.yaml:matrix: room_ids: - "!your_room_id:your_homeserver_domain" - "#room_alias:your_homeserver_domain" # Aliases work too
-
Run the bot
biblebot
Advanced Configuration
For detailed configuration options including:
- End-to-end encryption setup
- Message splitting configuration
- API key configuration for ESV
- Poetry formatting options
- Custom file locations
See the Configuration Guide.
Docker
The published image runs as a non-root user on amd64 and arm64 and keeps
configuration, credentials, and E2EE state under /data.
make setup
# Edit ~/.config/matrix-biblebot/config.yaml, then:
make auth-login
make run
Use make use-source && make build to build locally instead of pulling the
published image. See the Docker guide for Compose, custom
runtime paths, and direct Docker commands.
Running as a Service
For production use on Linux, install as a systemd user service:
biblebot service install
This creates a user service that starts automatically. Manage it with:
systemctl --user start biblebot.service # Start
systemctl --user stop biblebot.service # Stop
systemctl --user status biblebot.service # Check status
CLI Commands
# Configuration
biblebot config generate # Create sample config
biblebot config check # Validate config
# Authentication
biblebot auth login # Login to Matrix
biblebot auth logout # Clear credentials
biblebot auth status # Show auth status
biblebot auth cross-sign # Refresh an existing bot cross-signing identity
# Service management
biblebot service install # Install systemd service
# Running
biblebot # Start the bot
biblebot --log-level debug # Debug mode
Bot self-cross-signing
Cross-signing is never run during login or bot startup. Back up the E2EE
store before using the explicit command. The default location is
~/.local/state/matrix-biblebot/e2ee-store. If you have set a non-default
state directory, the store lives at $XDG_STATE_HOME/matrix-biblebot/e2ee-store
(or, when XDG_STATE_HOME is unset, ~/.local/state/matrix-biblebot/e2ee-store).
When BIBLEBOT_HOME is set, everything is under <BIBLEBOT_HOME>/e2ee-store
instead. Use biblebot auth status to confirm the resolved path on your
install before backing up. An
existing BibleBot-managed identity can be refreshed with
biblebot auth cross-sign; the Matrix password is prompted for and never saved.
The first run has no local _cross_signing.json sidecar and is refused by
default. Only after confirming the account has no Element-managed cross-signing
identity, run biblebot auth cross-sign --bootstrap. MindRoom nio cannot import
or reconcile an existing server-side identity, so bootstrapping can replace it.
Corrupt, unexpected, or multiple sidecars are refused rather than rotated.
The provider upgrade migrates the encrypted store schema from version 2 to 10
when first opened. Back up the complete store first. Recreate existing
environments rather than upgrading in place: matrix-nio and mindroom-nio
both own the nio import package and must not be co-installed.
Troubleshooting
Common issues:
- "No credentials found" → Run
biblebot auth loginfirst - Bot doesn't respond → Check room IDs in config, ensure bot is invited
- E2EE issues → Install with
[e2e]; if your Matrix client withholds keys from unverified devices, verify/cross-sign the bot device
For detailed troubleshooting, see Troubleshooting Guide.
Documentation
- Configuration Guide - Detailed setup, options, and E2EE setup
- Docker Guide - Prebuilt and source container deployment
- Development Guide - Contributing and development setup
- Troubleshooting - Common issues and solutions
Contributing
Contributions welcome! Please see Development Guide for setup instructions, project structure, and the Testing Guide for test conventions.
License
MIT License - see LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matrix_biblebot-0.3.0.tar.gz.
File metadata
- Download URL: matrix_biblebot-0.3.0.tar.gz
- Upload date:
- Size: 182.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f3bc70ad82b5d1c195bdfd59a20d71560d9b141f30aa49b924b2308c36c957b
|
|
| MD5 |
f9d22b39f0a4a95568a683b2837b816e
|
|
| BLAKE2b-256 |
3125fdbcdc8bf95f99a56bbab3ec17125caf205f93da3ad0be27c69b0c58ac07
|
Provenance
The following attestation bundles were made for matrix_biblebot-0.3.0.tar.gz:
Publisher:
pypi-publish.yml on jeremiah-k/matrix-biblebot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matrix_biblebot-0.3.0.tar.gz -
Subject digest:
2f3bc70ad82b5d1c195bdfd59a20d71560d9b141f30aa49b924b2308c36c957b - Sigstore transparency entry: 2786599424
- Sigstore integration time:
-
Permalink:
jeremiah-k/matrix-biblebot@9bb33f4e437fc15fedd4ba36ae3c3bbe1703a7a3 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/jeremiah-k
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@9bb33f4e437fc15fedd4ba36ae3c3bbe1703a7a3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file matrix_biblebot-0.3.0-py3-none-any.whl.
File metadata
- Download URL: matrix_biblebot-0.3.0-py3-none-any.whl
- Upload date:
- Size: 81.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22b32f72871e03764a48bdb32ec45bdb114c52cbc49de91e476b345a8e7371ca
|
|
| MD5 |
ff13456821ab58c19bfc8dddf27c75ce
|
|
| BLAKE2b-256 |
92ad360e86dea3814f4deba1eaf5fe2f5f42b2232f708ed000c3932ccba05fda
|
Provenance
The following attestation bundles were made for matrix_biblebot-0.3.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on jeremiah-k/matrix-biblebot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matrix_biblebot-0.3.0-py3-none-any.whl -
Subject digest:
22b32f72871e03764a48bdb32ec45bdb114c52cbc49de91e476b345a8e7371ca - Sigstore transparency entry: 2786599465
- Sigstore integration time:
-
Permalink:
jeremiah-k/matrix-biblebot@9bb33f4e437fc15fedd4ba36ae3c3bbe1703a7a3 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/jeremiah-k
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@9bb33f4e437fc15fedd4ba36ae3c3bbe1703a7a3 -
Trigger Event:
release
-
Statement type: