Skip to main content

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

  1. Install the bot

    pipx install matrix-biblebot
    
  2. Authenticate with Matrix

    biblebot auth login
    
  3. Generate and edit config

    biblebot config generate
    

    Then edit ~/.config/matrix-biblebot/config.yaml to add your room IDs.

  4. Run the bot

    biblebot
    
  5. 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

# 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:

  1. Add a ✅ reaction to your message
  2. Reply with the verse text formatted like: "Verse text - Reference 🕊️✝️"

Configuration

Basic Setup

  1. Authenticate with Matrix

    biblebot auth login
    
  2. Generate configuration file

    biblebot config generate
    
  3. 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
    
  4. 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 login first
  • 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

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.

Metadata

Release files for matrix-biblebot 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matrix-biblebot 0.3.0
File Size Uploaded Provenance Actions
matrix_biblebot-0.3.0.tar.gz 182.9 kB With provenance Details for matrix_biblebot-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for matrix-biblebot 0.3.0
File Interpreter ABI Platform Actions
matrix_biblebot-0.3.0-py3-none-any.whl Python 3 none any Details for matrix_biblebot-0.3.0-py3-none-any.whl

Total release size: 264.7 kB

Release files / matrix_biblebot-0.3.0.tar.gz

Download URL matrix_biblebot-0.3.0.tar.gz
Size 182.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2f3bc70ad82b5d1c195bdfd59a20d71560d9b141f30aa49b924b2308c36c957b
BLAKE2b-256 checksum
How to use checksums
3125fdbcdc8bf95f99a56bbab3ec17125caf205f93da3ad0be27c69b0c58ac07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / matrix_biblebot-0.3.0-py3-none-any.whl

Download URL matrix_biblebot-0.3.0-py3-none-any.whl
Size 81.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22b32f72871e03764a48bdb32ec45bdb114c52cbc49de91e476b345a8e7371ca
BLAKE2b-256 checksum
How to use checksums
92ad360e86dea3814f4deba1eaf5fe2f5f42b2232f708ed000c3932ccba05fda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Security for matrix-biblebot 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for matrix_biblebot-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page