Skip to main content

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 reference
  • bible random - Display a random verse
  • bible 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 bookmarks
  • bible bookmark add <reference> - Add bookmark
  • bible history - Show reading history

Interactive Mode

Launch the Terminal User Interface:

bible interactive
# or just
bible

Keyboard Shortcuts

  • j/k or โ†“/โ†‘ - Navigate verses
  • h/l or โ†/โ†’ - Previous/Next chapter
  • Space/b - Page down/up
  • g - Go to verse
  • / - Search mode
  • r - Random verse
  • m - Bookmark current verse
  • ? - Help
  • q - 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 verse
  • GET /api/search?q={query} - Search verses
  • GET /api/books - List all books
  • GET /api/random - Get random verse
  • GET /api/context/{reference} - Get verse with context
  • POST /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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Run tests and linting
  6. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Support

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

bibli-0.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

bibli-0.1.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

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

Hashes for bibli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 98ee7dd1c704ede2b61ac0c778d320d1c7ceb86c78342c4290952b15ffd91945
MD5 86e19244d4d550b83122a413415b0674
BLAKE2b-256 3496290c53a3a4923fe9e1688018a3df16ed66f5d7542c260558fc961ebfc681

See more details on using hashes here.

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

Hashes for bibli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 962e81ddfb1b6d643ab6bb3c3f35255b9297ce887390dd5c32c15551f97c3d7d
MD5 f0a90f1d03d84c31fa7210e467a47c6e
BLAKE2b-256 b1f62d6fc0c0c2c5d0f95b282a25db6e1d3f97a555e24fdfd3390315c4d8fdb6

See more details on using hashes here.

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