Biblical study assistant with AI-powered analysis and research
Project description
Biblia
A terminal-based biblical research assistant. Generates theological analysis, daily verse devotionals, spiritual reflections, and exportable study sessions — powered by Google Gemini 2.5 Flash.
Installation
From PyPI
pip install biblia
From source
git clone https://github.com/ashioyajotham/bible.git
cd bible
pip install -e .
Runtime dependencies: google-generativeai, rich, requests, python-dotenv, colorama.
No GPU, no PyTorch, no HuggingFace stack required.
Configuration
Create a .env file in your working directory:
GEMINI_API_KEY=your_gemini_key
SERPER_API_KEY=your_serper_key # web search for teaching enrichment
ESV_API_KEY=your_esv_key # verse text lookup
All three keys are validated on first run; missing values are prompted interactively and can be saved to .env.
Usage
bible [--theme dark|scholar|minimal] [--verbose]
| Command | Alias | Description |
|---|---|---|
teach |
t |
Generate theological analysis on any topic |
verse |
v |
Fetch a daily verse with AI-generated devotional |
reflect |
r |
Summarise and reflect on the current session |
export |
e |
Write the full session to a Markdown file |
help |
h |
Show command reference |
exit |
q |
Quit |
Theme options
| Theme | Character |
|---|---|
dark |
Cyan/blue accents — default terminal look |
scholar |
Amber/yellow tones — warm, document-like |
minimal |
White borders only — maximum readability |
Architecture
bible/
├── agent/
│ ├── bible_agent.py — main agent; owns the command dispatch loop
│ ├── search_agent.py — Serper + Gemini search-and-analyse pipeline
│ ├── base_agent.py — abstract agent with goal/planner/memory stubs
│ └── components/
│ ├── session.py — StudySession: accumulates teachings/verses/reflections
│ ├── goal_system.py
│ ├── planner.py
│ ├── memory.py
│ └── learner.py
├── services/
│ ├── model_manager.py — singleton GeminiLLM factory
│ ├── serper_service.py — Serper search API wrapper
│ └── llm/
│ ├── gemini_llm.py — Gemini 2.5-flash wrapper
│ ├── model_selector.py
│ └── model_types.py
├── utils/formatters/
│ ├── console_formatter.py — Rich-based TUI renderer; theme-aware
│ └── markdown_formatter.py
├── config/settings.py — env-based Config dataclass
├── models/
│ ├── verse.py
│ └── verse_categories.py
├── tests/
│ ├── conftest.py
│ ├── test_bible_agent.py — unit tests
│ └── test_integration.py — end-to-end flow tests
└── main.py — CLI entry point
Running tests
pip install pytest
pytest
Integration tests mock all external APIs (Gemini, Serper, ESV) so no keys are needed to run the suite.
Publishing (maintainers)
This repo uses OIDC trusted publishing to PyPI — no PYPI_API_TOKEN secret is needed.
One-time setup on pypi.org:
- Go to your project → Publishing → Add a trusted publisher.
- Enter: owner
ashioyajotham, repositorybible, workflowpublish.yml.
After that, creating a GitHub release triggers the workflow automatically.
License
MIT — see LICENSE.
Disclaimer
Biblia is a research and study aid. Output should be cross-referenced with authoritative theological sources and pastoral guidance.
Project details
Release history Release notifications | RSS feed
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 biblia-0.7.0.tar.gz.
File metadata
- Download URL: biblia-0.7.0.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd464be693f14e44232463b8cfe64f889aed68ec49bae370af40a0558c7fe2a9
|
|
| MD5 |
5919758dfef4c728e300ce24ab5b0c47
|
|
| BLAKE2b-256 |
07a03100b8928196125fcf31326d7ba177c020f0cf4379fa9c7b179c0620b788
|
Provenance
The following attestation bundles were made for biblia-0.7.0.tar.gz:
Publisher:
publish.yml on ashioyajotham/bible
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biblia-0.7.0.tar.gz -
Subject digest:
cd464be693f14e44232463b8cfe64f889aed68ec49bae370af40a0558c7fe2a9 - Sigstore transparency entry: 1251610886
- Sigstore integration time:
-
Permalink:
ashioyajotham/bible@d8452a6658369913bb7defc84ea1175c0708ba23 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/ashioyajotham
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d8452a6658369913bb7defc84ea1175c0708ba23 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file biblia-0.7.0-py3-none-any.whl.
File metadata
- Download URL: biblia-0.7.0-py3-none-any.whl
- Upload date:
- Size: 29.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5edfb654f20940c183bb4341c3813ab3a91811fd225e1999de17f9e93477ecc
|
|
| MD5 |
c3f13a592d7779c468f32964c88fcebc
|
|
| BLAKE2b-256 |
73f6eaa1c381b65551d6fff73c9b590b9ab0fa8708e3f36a6975408c46686583
|
Provenance
The following attestation bundles were made for biblia-0.7.0-py3-none-any.whl:
Publisher:
publish.yml on ashioyajotham/bible
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biblia-0.7.0-py3-none-any.whl -
Subject digest:
a5edfb654f20940c183bb4341c3813ab3a91811fd225e1999de17f9e93477ecc - Sigstore transparency entry: 1251610931
- Sigstore integration time:
-
Permalink:
ashioyajotham/bible@d8452a6658369913bb7defc84ea1175c0708ba23 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/ashioyajotham
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d8452a6658369913bb7defc84ea1175c0708ba23 -
Trigger Event:
workflow_dispatch
-
Statement type: