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
Installation
From PyPI (when published)
pip install bible-cli
# or
pipx install bible-cli
From Source
git clone https://github.com/bible-cli/bible-cli
cd bible-cli
pip install -e .
Using Poetry
git clone https://github.com/bible-cli/bible-cli
cd bible-cli
poetry install
poetry shell
Quick Start
# Read a specific verse
bible read john 3:16
# Read a range of verses
bible read genesis 1:1-5
# Read an entire chapter
bible read psalms 23
# Search for verses
bible search "love your enemies"
# Interactive mode
bible
# Get help
bible --help
Commands
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 day
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--regex- Use regex patterns
Bookmark Commands
bible bookmarks- List saved bookmarksbible bookmark add <reference>- Add bookmarkbible history- Show reading history
Interactive Mode
Launch the Terminal User Interface:
bible interactive
# or just
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
MCP Server
Start the Model Context Protocol server for AI integration:
bible mcp serve --port 8000
API Endpoints
GET /api/verse/{reference}- Get specific verseGET /api/search?q={query}- Search versesGET /api/books- List all booksGET /api/random- Get random verseGET /api/context/{reference}- Get verse with contextPOST /api/export- Export verses in various formats
Configuration
Configuration file: ~/.config/bible-cli/config.toml
[general]
default_translation = "NIV"
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/bible-cli/bible-cli
cd bible-cli
poetry install
poetry shell
Run Tests
pytest
pytest --cov=bible_cli
Code Quality
black bible_cli/
ruff check bible_cli/
mypy bible_cli/
Project Structure
bible-cli/
โโโ bible_cli/
โ โโโ __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
bible read john 3:16
# Read Genesis 1:1-10
bible read genesis 1:1-10
# Search for verses about love
bible search love --testament new
# Search with context
bible search "faith without works" --context 2
Advanced Search
# Exact phrase search
bible search "in the beginning" --exact
# Case-sensitive search
bible search "God" --case-sensitive
# Regex search
bible search "love.*neighbor" --regex
# Limit to specific book
bible search faith --book james
Bookmarks and History
# Add bookmark
bible bookmark add "john 3:16" --name "God's Love"
# List bookmarks
bible bookmarks
# View reading history
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
- 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.0.tar.gz.
File metadata
- Download URL: bibli-0.1.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98ee7dd1c704ede2b61ac0c778d320d1c7ceb86c78342c4290952b15ffd91945
|
|
| MD5 |
86e19244d4d550b83122a413415b0674
|
|
| BLAKE2b-256 |
3496290c53a3a4923fe9e1688018a3df16ed66f5d7542c260558fc961ebfc681
|
File details
Details for the file bibli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bibli-0.1.0-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.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
962e81ddfb1b6d643ab6bb3c3f35255b9297ce887390dd5c32c15551f97c3d7d
|
|
| MD5 |
f0a90f1d03d84c31fa7210e467a47c6e
|
|
| BLAKE2b-256 |
b1f62d6fc0c0c2c5d0f95b282a25db6e1d3f97a555e24fdfd3390315c4d8fdb6
|