grepbible
is a command-line interface (CLI) tool designed to make searching for Bible verses (in ca. 60 languages) locally (like grepping) and looking up the Bible quotes fast and intuitive.
It also represents a new channel for Bible distribution and aids in language learning, as parallel Bible translations have been used for centuries to learn languages.
Wikipedia article on Bible citations
The raw text is taken from Wordproject®, and has undergone processing to fit the specific needs and format of this project.
There's a serparate project for the web UI: grepbible-server. Its demo is available at langtools.io/gb
To install grepbible
, ensure you have Python 3.9 or higher installed on your system. You can install grepbible
directly from PyPI:
pip install grepbible
This command installs the grepbible
package and makes the gbib
command available in your shell.
You might need to update your PATH
as well (e.g. on Ubuntu):
export PATH=$PATH:$(python3 -m site --user-base)/bin
and add it to ~/.bashrc
to make it persistent
grepbible
is designed to be straightforward and easy to use from the command line. The default version (unless the flag -v
is specified) is 'kj' (KJV), in English.
Below are some common usage examples:
gbib -c "John 3:11"
Verily, verily, I say unto thee, We speak that we do know, and testify that we have seen; and ye receive not our witness.
gbib -v kj,pl -c "Romans 8:20"
For the creature was made subject to vanity, not willingly, but by reason of him who hath subjected the same in hope,
Gdyż stworzenie marności jest poddane, nie dobrowolnie, ale dla tego, który je poddał,
gbib -c 'Psalms 117'
O Praise the LORD, all ye nations: praise him, all ye people.
For his merciful kindness is great toward us: and the truth of the LORD endureth for ever. Praise ye the LORD.
gbib -c "Gen 41:29-30"
Behold, there come seven years of great plenty throughout all the land of Egypt:
And there shall arise after them seven years of famine; and all the plenty shall be forgotten in the land of Egypt; and the famine shall consume the land;
gbib -c "Genesis 1:1,3"
Show interleave translation of Latin Vulgata to English KJV (line-by-line):
gbib -c 'Gen 41:29-30' -v kj,vg -i
Block-by block translation (omit the flag -i
):
gbib -c 'Gen 41:29-30' -v kj,vg
Behold, there come seven years of great plenty throughout all the land of Egypt:
And there shall arise after them seven years of famine; and all the plenty shall be forgotten in the land of Egypt; and the famine shall consume the land;
ecce septem anni venient fertilitatis magnae in universa terra Aegypti
quos sequentur septem anni alii tantae sterilitatis ut oblivioni tradatur cuncta retro abundantia consumptura est enim fames omnem terram
Time for some fun! One can generate random quotes (in different languages and in parallel as well).
gbib -r
For more information on command options and additional features, you can run:
gbib --help
One can literally use grep
to look up the verses and leverage gbib
only for downloading the sources. Here's how.
First, download KJV ('kj') and Vulgata ('vg'). The data is stored in $HOME/grepbible_data
, thus, it makes sense to store it as a variable, e.g. the path to the 5th chapter of Exodus in KJV will be $HOME/grepbible_data/kj/Exodus/5.txt
gbib -d kj,vg
export GB=$HOME/grepbible_data/kj
Example, jump 10th line of 5th chapter in Exodus:
less +10 $GB/Exodus/5.txt
How often the word 'camel' appears in the Bible:
grep -nr $GB -e camel | wc -l # 59
grep -nr $GB -e wolves | grep sheep
Contributions to grepbible
are welcome! Whether it's improving code, or reporting issues, or spreading the word, or financial support, your input is valuable.
To raise an issue, go to 'Issues' tab, and click on 'New issue'.
To contribute code:
Please ensure your code adheres to the project's style and quality standards. For major changes, please open an issue first to discuss what you would like to change.
Feel free to spread the word or/and use the hashtag #grepbible
in social media.
grepbible
is open-source software licensed under the MIT License. See the LICENSE file for more details.