Skip to main content

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:

  1. Go to your project → PublishingAdd a trusted publisher.
  2. Enter: owner ashioyajotham, repository bible, workflow publish.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biblia-0.9.0.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biblia-0.9.0-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file biblia-0.9.0.tar.gz.

File metadata

  • Download URL: biblia-0.9.0.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for biblia-0.9.0.tar.gz
Algorithm Hash digest
SHA256 d9be76319d1933a6cac0476ae1e0800bdffde1aa5f307f6fba8455d45a0d6844
MD5 16f3deef058395f317258dfc67ef56b6
BLAKE2b-256 c36f66e941199cf53746fa143ed73b268e126bc562a3d4809c9dbb65ea4aea8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for biblia-0.9.0.tar.gz:

Publisher: release.yml on ashioyajotham/bible

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biblia-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: biblia-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for biblia-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ada0135205e539ced25f8350ab56f62ebc88834b3092f9376c1619634b6c604
MD5 7c11d670be545c987937782f1d19c62a
BLAKE2b-256 4f8b9aa6d2a72e1cf571aa0a8fd1f7119d05234c8ffd3301addb64f02086dcad

See more details on using hashes here.

Provenance

The following attestation bundles were made for biblia-0.9.0-py3-none-any.whl:

Publisher: release.yml on ashioyajotham/bible

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page