Skip to content

Terminal based interface

Zoltán Kovács edited this page Jan 29, 2026 · 4 revisions

The web version

In the following we refer to the Double-tab, no mouse web interface of bibref.

Terminal based interface demo

Inputs can be typed after the > prompt. Keywords like commands and names of Bible editions and books are highlighted during typing. Pressing TAB in the middle of typing a keyword will result in either finishing the keyword or showing a list of possible endings for the typed input. Pressing TAB twice (when a word is not yet started to type) shows all possible keywords. As usual in terminal based software, the input must be entered by pressing the ENTER key.

The output is usually quickly computed, but for some operations, the computation may take a while. For the time of computation the browser may be unresponsive and ask you to decide if the computation should be terminated.

Example

We lookup Psalm 117 in the Old Testament and try to find if it has a connection to the New Testament. Note that Psalm 117 is numbered differently than in other Bible editions (here with 116). We refer to the shortest psalm in the book of Psalms.

> lookup LXX Psalms 116:1
αλληλουια αινειτε τον κυριον παντα τα εθνη επαινεσατε αυτον παντες οι λαοι
> lookup LXX Psalms 116:2
οτι εκραταιωθη το ελεος αυτου εφ ημας και η αληθεια του κυριου μενει εις τον αιωνα
> getrefs StatResGNT LXX Psalms 116
LXX Psalms 116:1+36 116:1-18 = StatResGNT Romans 15:11+38 15:11-21 (length=9, pos1=137244, pos2=30321)
LXX Psalms 116:2+34 116:2-22 = StatResGNT Galatians 2:5+34 2:5-26 (length=11, pos1=137305, pos2=2210)
LXX Psalms 116:2+34 116:2-22 = StatResGNT Romans 3:7+4 3:7-75 (length=11, pos1=137305, pos2=5469)
LXX Psalms 116:2+30 116:2-25 = StatResGNT John 14:6+26 14:6-43 (length=12, pos1=137301, pos2=48531)
LXX Psalms 116:2+30 116:2-25 = StatResGNT John 1:17+29 1:17-22 (length=12, pos1=137301, pos2=1008)
LXX Psalms 116:1+46 116:1 = StatResGNT Romans 15:11+51 15:11 (length=17, pos1=137254, pos2=30334)
LXX Psalms 116:2+45 116:2 = StatResGNT I_Peter 1:25+8 1:25-39 (length=22, pos1=137316, pos2=2131)
Finished

For a detailed explanation we refer to the commands lookup and getrefs.

The outputs (and also the inputs) can be copied to another program by selecting them with the mouse and using the usual way of the operating system to copy and paste them into a different window. The previous inputs, including earlier sessions of the program, can be retrieved by the key (also, the can be used to navigate in the input history). Similarly to other terminal based software, the shortcut Ctrl-R can search for a text in previous inputs. These features are provided by the jquery.terminal library.

Linux version

The simplest way to use the Linux terminal interface is to install it as snap. Then, it can be started from the command line with the command bibref:

$ bibref 
This is bibref 2025-12-07, nice to meet you.
Available Bible translations: KJV, LXX, SBLGNT, StatResGNT.
>>

Similarly to the web version, inputs can be typed after the >> prompt. Pressing TAB in the middle of typing a keyword will result in either finishing the keyword or showing a list of possible endings for the typed input. Pressing TAB twice (when a word is not yet started to type) shows all possible keywords. As usual in terminal based software, the input must be entered by pressing the ENTER key.

To access most of the commands, the command addbooks should be entered first. When starting the program for the first time in the current working folder, the following messages (or something similar) will appear (this takes a couple of seconds):

>> addbooks 
Missing version information for cache for module LXX.
Cache must be recreated.
Loading LXX...
Genesis contains 150801 characters,
Exodus contains 120419 characters,
Leviticus contains 91277 characters,
Numbers contains 124089 characters,
...
Susanna contains 4145 characters,
Daniel contains 53106 characters,
Bel_and_the_Dragon contains 4286 characters,
and Odes contains 1550 characters.
Done loading books of LXX.
Missing version information for cache for module SBLGNT.
Cache must be recreated.
Loading SBLGNT...
Matthew contains 90007 characters,
Mark contains 56437 characters,
Luke contains 95834 characters,
...
III_John contains 1107 characters,
Jude contains 2576 characters,
and Revelation_of_John contains 45961 characters.
Done loading books of SBLGNT.
The SWORD module StatResGNT is not installed.

For the second run, this process is much faster and only the following information is shown:

>> addbooks 
Done loading books of LXX (cached).
Done loading books of SBLGNT (cached).
The SWORD module StatResGNT is not installed.

Example

We would like to find the connection between Matthew 2:6 and Micah 5:1.

>> lookup SBLGNT Matthew 2:6
Και συ, Βηθλεεμ γη Ιουδα, ουδαμως ελαχιστη ει εν τοις ηγεμοσιν Ιουδα· εκ σου γαρ εξελευσεται ηγουμενος, οστις ποιμανει τον λαον μου τον Ισραηλ. 
>> lookup1 SBLGNT Matthew 2:6
Stored internally as kaisybhuleemghioydaoydamvselaxistheientoishgemosinioydaeksoygarejeleysetaihgoymenosostispoimaneitonlaonmoytonisrahl.
>> text1 Και συ, Βηθλεεμ
Stored internally as kaisybhuleem.
>> find1 LXX
Found in Micah 5:1 5:1-132 (book position 6563-6574)
1 occurrences.
>> getrefs SBLGNT LXX Micah 5:1
LXX Micah 5:1+62 5:1-76 = SBLGNT Matthew 19:18+40 19:18-34 (length=6, pos1=6625, pos2=54992)
LXX Micah 5:1+62 5:1-76 = SBLGNT Philemon 1:13+40 1:13-33 (length=6, pos1=6625, pos2=822)
LXX Micah 5:1+10 5:1-127 = SBLGNT Galatians 6:14+67 6:14-22 (length=7, pos1=6573, pos2=10777)
LXX Micah 5:1+92 5:1-43 = SBLGNT John 11:17+43 11:17-7 (length=9, pos1=6655, pos2=37878)
LXX Micah 5:1 5:1-132 = SBLGNT Matthew 2:6 2:6-103 (length=12, pos1=6563, pos2=2608)
LXX Micah 5:1+52 5:1-79 = SBLGNT Matthew 2:6+47 2:6-55 (length=13, pos1=6615, pos2=2655)
Finished

This confirms that there are two pairs of fragments that match letter-by-letter.

Command line options

To get a full list of the available command line arguments, one needs to issue bibref -h:

Usage: /snap/bibref/.../usr/local/bin/bibref [options]
 where options can be:
 -h            this help
 -e            show input/output to fit examples
 -a            run the addbooks command on startup
 -c            use colored output

Here

  • -e implies some minor changes in the command line prompt to be consistent with the example inputs and outputs.
  • -a immediately issues the addbooks command to speed up starting the work.
  • -c enables colored output for certain messages of the program.

Readline support

During terminal sessions the command line history can be browsed with the arrow keys ( and ) and to search for a certain input, Ctrl-R can be used. Further information on the available features can be found in the GNU Readline Library manual.

Clone this wiki locally