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.
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.
-
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!
- π 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
# Basic installation
pipx install matrix-biblebot
# With end-to-end encryption support
pipx install 'matrix-biblebot[e2e]'
# Windows PowerShell: pipx install "matrix-biblebot[e2e]"pip install matrix-biblebot
# or with E2EE support
pip install 'matrix-biblebot[e2e]'
# Windows PowerShell: pip install "matrix-biblebot[e2e]"git clone https://github.com/jeremiah-k/matrix-biblebot.git
cd matrix-biblebot
pip install '.[e2e]' # Includes E2EE supportThe 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 |
- KJV (King James Version) - Default, no setup required
- ESV (English Standard Version) - Requires free API key from api.esv.org
The bot recognizes many abbreviations: gen (Genesis), exo (Exodus), matt (Matthew), jn (John), 1co (1 Corinthians), rev (Revelation), and many more. See full list.
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 |
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 ποΈβοΈ"
-
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
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.
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 runUse 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.
For production use on Linux, install as a systemd user service:
biblebot service installThis 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# 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 modeCross-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.
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.
- 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
Contributions welcome! Please see Development Guide for setup instructions, project structure, and the Testing Guide for test conventions.
MIT License - see LICENSE file for details.