Skip to main content

purebible (Python) — for people who live in nvim, btop & the terminal

Zero-dependency Python remake of the purebible terminal client. Vim keys. btop-style bars. Pipes like a good Unix citizen. No Qt, no build.

purebible "God | Jesus"        # OR search
purebible "God Jesus"          # exact phrase
purebible "James* & John*"     # AND in same verse (new: old CLI gave 0 rows)
purebible "John 3:16"          # smart-dispatch → lookup
purebible lookup "Rom 12:1-2"  # ranges + whole chapters ("John 3")
purebible tui "love*"          # fullscreen: j/k, /, :, n/N, y, q

Install from GitHub (Arch Linux)

sudo pacman -S python-pipx      # isolated CLI installs, the Arch-friendly way
pipx install git+https://github.com/ripekern/purebible-py.git
mkdir -p ~/.local/share/purebible   # KJV text, 9 MB, public domain
curl -L https://raw.githubusercontent.com/dewhisna/KingJamesPureBibleSearch/master/text/complete/SW1769Bible_both.txt \
  -o ~/.local/share/purebible/SW1769Bible_both.txt
purebible "John 3:16"           # verify
purebible tui                   # full-screen mode

No AUR package (yet). pipx keeps it off system python — Arch is externally-managed, so plain pip would need --break-system-packages. Without pipx: pip install --user --break-system-packages git+https://github.com/ripekern/purebible-py.git. Zero runtime dependencies either way (curses ships with Arch's python).

Install for development

cd ~/Work/purebible-py
pip install -e . --break-system-packages   # gives `purebible` + short alias `pb`
# or without install:
python3 -m purebible "John 3:16"

Needs the KJV text (ships with purebiblesearch, 8.8 MB) — one-time setup:

mkdir -p ~/.local/share/purebible
ln -s ~/Work/purebiblesearch/text/complete/SW1769Bible_both.txt \
      ~/.local/share/purebible/SW1769Bible_both.txt
# alternatives: export PUREBIBLE_TEXT=/path/to/SW1769Bible_both.txt,
# or copy it to ./data/ or ~/.config/purebible/

Why this exists

purebible-cli (C++/Qt) is exact but heavy: CMake, Qt6, daemon sockets, 30 MB servers. This is the same terminal client rewritten in pure Python for terminal-first users:

  • nvim: purebible prints ref: text, one per line — :r !pb "Rom 12:1-2", quickfix-friendly, --refs-only + fzf ready, --no-color for pipes.
  • btop: purebible tui is a live dashboard — header stats bar, reverse-video statusline, instant ms timings.
  • terminal: nvim-style NORMAL/INSERT/COMMAND modes (/ fresh search, i caret before current query, a caret after it, arrows + C-u/C-w editing, : for commands, Esc drops back to NORMAL and never quits — quitting is q, ZZ/ZQ or :q, NORMAL mode only), : opens a centered noice-style popup in the upper third, and the bar stays minimal — mode tag + current search only (confirmations flash briefly). Jumplist (Enter opens a chapter, C-o jumps back), / prompt history, C-u/C-w line editing, even :w politely refuses. Lualine-style mode tags and refs colored for your system theme (auto-detected, PUREBIBLE_THEME=dark|light to override), :help opens a scrollable screen with the key list + every search and lookup pattern, :clear to clear results, NO_COLOR respected, works over SSH with zero deps.

Query language

syntax meaning example
a b phrase (consecutive) "God said" → 9 hits
a | b OR (union) "God | Jesus"
a & b AND (same verse) "James* & John*"
a & -b NOT (verse must lack b) "love & -loved"
love* ?eth [a-z] wildcards per word "four*"
\c / \C vim case override (\C sensitive) "Amen\C" → 77
bare * any single word gap "God * heaven"

Flags mirror the old client: -c/--case, -A/--abbrev, -w/--no-wordindex, -d/--no-dup, --comma, --refs-only, --book/--chapter/--verse (scope for &), plus --count, --limit N.

License

Open source. Code is GPL-3.0-or-later (same as the project it was ported from); the King James Bible text itself is public domain.

Notes / differences

  • Native build ships KJV 1769 only (bibles1). Asking for another id prints a note and maps to 1 (the old Qt backend had 40+).
  • Search runs on the whole-Bible word stream like KJPBS (phrases may span verse boundaries); * inside a phrase is a single-word skip. Hyphenated compounds (Bar-jesus), ligatures (CæsarCaesar), psalm superscriptions and Pauline colophons all match the C++ concordance — verified identical counts and word indexes on a battery of queries (Jesus 973, God 4444, David 930 deduped, …). -y enables hyphen-sensitive mode.
  • & is new (old CLI treated it as a literal word → always 0). | and phrase/wildcard semantics match the original.

Release files for purebible 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for purebible 0.1.0
File Size Uploaded
purebible-0.1.0.tar.gz 34.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for purebible 0.1.0
File Interpreter ABI Platform
purebible-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 68.4 kB

Release files / purebible-0.1.0.tar.gz

Download URL purebible-0.1.0.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2377d92969fc529b72a7207de6025a2911b285d77f2e79f66e7869f347bb2173
BLAKE2b-256 checksum
How to use checksums
2553a3298c3a33bc226bfacc967a9e9b3336e9fc48ddfd3fd49a1e425a00ce4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / purebible-0.1.0-py3-none-any.whl

Download URL purebible-0.1.0-py3-none-any.whl
Size 33.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7930087767f7df14bad0ddb1d45df668c2af34f3acadb410946d070f00e23db
BLAKE2b-256 checksum
How to use checksums
50293df86e2628a900fb04ff7368a2598bcdb091e40caec8d64319b64f3f53a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page