A command-line interface Bible application for programmers
Project description
Bible CLI
A powerful command-line interface for Bible reading and study, designed specifically for programmers and terminal enthusiasts.
Features
- ๐ Fast Search - Full-text search with regex support and context
- ๐ Multiple Translations - Support for various Bible translations
- ๐จ Rich Terminal UI - Beautiful ASCII art and interactive TUI
- ๐ Bookmarks - Save and organize your favorite verses
- ๐ Reading History - Track your Bible reading progress
- ๐ง MCP Integration - Model Context Protocol server for AI tools
- โ๏ธ Customizable - Extensive configuration options
- ๐ฏ Developer-Friendly - Designed with programmers in mind
- ๐ Database Statistics - View Bible database information and statistics
Installation
From PyPI (when published)
pip install bibli
# or
pipx install bibli
From Source with UV (Recommended)
git clone https://github.com/guzus/bible-cli
cd bible-cli
uv sync
From Source with pip
git clone https://github.com/guzus/bible-cli
cd bible-cli
pip install -e .
Quick Start
# Read a specific verse
uv run bible read john 3:16
# Read a range of verses
uv run bible read genesis 1:1-5
# Read an entire chapter
uv run bible read psalms 23
# Search for verses
uv run bible search "love your enemies"
# View database information
uv run bible info
# Interactive mode
uv run bible
# Get help
uv run bible --help
Commands
Information Commands
bible info- Display Bible database information and statistics with ASCII art
Reading Commands
bible read <book> <chapter>:<verse>- Read specific verse(s)bible goto <reference>- Jump directly to a referencebible random- Display a random versebible daily- Show verse of the daybible nav <book> <reference>- Navigate Bible interactively
Search Commands
bible search <query>- Search for words or phrases--exact- Exact phrase matching--case-sensitive- Case-sensitive search--book <name>- Limit search to specific book--testament <old|new>- Limit to testament--context <n>- Show n verses of context--limit <n>- Maximum number of results
Bookmark Commands
bible bookmarks- List saved bookmarksbible bookmark add <reference>- Add bookmark--name <name>- Bookmark name--notes <notes>- Bookmark notes
bible history- Show reading history
Interactive Mode
Launch the Terminal User Interface:
uv run bible interactive
# or just
uv run bible
Keyboard Shortcuts
j/korโ/โ- Navigate versesh/lorโ/โ- Previous/Next chapterSpace/b- Page down/upg- Go to verse/- Search moder- Random versem- Bookmark current verse?- Helpq- Quit
Interactive Reader Navigation
When using --interactive flag with read commands:
norEnter- Next versep- Previous verseN- Next chapterP- Previous chapterg- Go to specific verseb- Bookmark current verseq- Quit
MCP Server
The Bible CLI includes a Model Context Protocol (MCP) server that allows AI applications like Claude to access Bible functionality directly.
Starting the MCP Server
uv run bibli mcp-server
The server runs using stdio transport and can be connected to by MCP clients.
MCP Capabilities
๐ง Tools (AI can call these functions)
search_verses- Search for Bible verses containing specific textget_verse- Get a specific Bible verse by reference (e.g., "John 3:16")get_chapter- Get all verses from a Bible chapterget_random_verse- Get a random Bible verseget_cross_references- Find related verses for cross-referencing
๐ Resources (Contextual data for AI)
bible://books- List of all Bible books with metadatabible://book/{book_name}- Information about a specific book
๐ญ Prompts (Templates for Bible study)
bible-study- Generate comprehensive Bible study materialsverse-explanation- Provide detailed verse explanations and contextdevotional- Create devotional reflections based on passagessermon-outline- Generate sermon outlines from Bible texts
Connecting to Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"bible-cli": {
"command": "uvx",
"args": ["--from", "bibli", "bible", "mcp-server"]
}
}
}
Testing the MCP Server
# Run the test script
uv run test_mcp.py
Example Usage with MCP
Once connected to an AI application:
- Search verses: "Find verses about love"
- Get explanations: "Explain John 3:16 in detail"
- Bible study: "Create a Bible study for Psalm 23"
- Cross-references: "What verses relate to Romans 8:28?"
Configuration
Configuration file: ~/.config/bible-cli/config.toml
[general]
default_translation = "BBE"
theme = "dark"
page_size = 10
show_verse_numbers = true
[ascii_art]
enabled = true
style = "simple"
[mcp]
enabled = false
endpoint = "http://localhost:8000"
[keybindings]
next_verse = ["j", "down"]
prev_verse = ["k", "up"]
search = ["/"]
Data Sources
The application automatically downloads Bible data from:
- Basic Bible English (BBE) translation from Open Bibles
Additional translations can be imported from:
- JSON Bible files
- USFX XML format
- Custom API endpoints
Development
Setup Development Environment
git clone https://github.com/guzus/bible-cli
cd bible-cli
uv sync --extra dev
Run Tests
uv run pytest
uv run pytest --cov=bibli
Code Quality
uv run black bibli/
Project Structure
bible-cli/
โโโ bibli/
โ โโโ __init__.py # Package initialization
โ โโโ __main__.py # Main entry point
โ โโโ cli.py # Click command definitions
โ โโโ tui.py # Textual TUI app
โ โโโ models.py # SQLAlchemy models
โ โโโ search.py # Search implementation
โ โโโ mcp_server.py # FastAPI MCP server
โ โโโ config.py # Configuration handling
โ โโโ ascii_art.py # ASCII art constants
โ โโโ data_import.py # Data import functionality
โ โโโ utils.py # Helper functions
โโโ tests/ # Test files
โโโ pyproject.toml # Project configuration
โโโ README.md # This file
Examples
Basic Usage
# Read John 3:16
uv run bible read john 3:16
# Read Genesis 1:1-10
uv run bible read genesis 1:1-10
# Search for verses about love
uv run bible search love --testament new
# Search with context
uv run bible search "faith without works" --context 2
# View database statistics
uv run bible info
Advanced Search
# Exact phrase search
uv run bible search "in the beginning" --exact
# Case-sensitive search
uv run bible search "God" --case-sensitive
# Limit to specific book
uv run bible search faith --book james
# Limit results
uv run bible search love --limit 5
Interactive Reading
# Read with interactive navigation
uv run bible read john 3:16 --interactive
# Navigate interactively from a specific verse
uv run bible nav john 3:16
# Read with context
uv run bible read john 3:16 --context 3
Bookmarks and History
# Add bookmark
uv run bible bookmark add "john 3:16" --name "God's Love"
# List bookmarks
uv run bible bookmarks
# View reading history
uv run bible history --limit 10
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run tests and linting
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Bible data from Open Bibles
- Built with Click, Textual, and Rich
- Uses UV for fast dependency management
- Inspired by the need for developer-friendly Bible study tools
Support
- ๐ Report bugs
- ๐ก Request features
- ๐ Documentation
- ๐ฌ Community
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
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 bibli-0.1.3.tar.gz.
File metadata
- Download URL: bibli-0.1.3.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e71dcea2297aa3cababacc3965f0bd90e7e09d2ca9b14fd0d1c5b2af83fc39d4
|
|
| MD5 |
bc18466daada9377ccbca15239a7d945
|
|
| BLAKE2b-256 |
905baa7ac9e6f6ed4965322ff1133a12aa7c036ec16fdae69f64d2c6946478f9
|
File details
Details for the file bibli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: bibli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4b11870b17c85f6f9e1b8e5cab40010a0bf1e7c9173951954ec619f3dd9c914
|
|
| MD5 |
e0480555e930ef4e66c2740f8d382c99
|
|
| BLAKE2b-256 |
2d5aeec1991fd6bfc3533a3ef1d233a634d368de21b42e11a20e4ebf7c7d81bf
|