A command line reader, searcher, and quiz tool for the Westminster Standards.
Project description
Westminster Standards CLI
A small command line tool for reading, searching, and quizzing yourself on the Westminster Standards.
The CLI ships with the Orthodox Presbyterian Church constitutional text for:
- Westminster Confession of Faith (
wcf) - Westminster Larger Catechism (
wlc) - Westminster Shorter Catechism (
wsc)
The data is derived from the OPC pages linked from https://opc.org/confessions.html. The constitutional text is the default; the 2025 Modern English Study Version (MESV) is also bundled and available via -m/--mesv and --compare. Note the OPC preface: the MESV is a study aid and carries no constitutional authority.
The bundled corpus lives in src/westminster_cli/data/standards.json. The importer in scripts/build_opc_corpus.py can rebuild it from downloaded OPC HTML.
Installation
You need Python 3.9+ and uv installed.
Install uv if you do not already have it:
curl -LsSf https://astral.sh/uv/install.sh | sh
To try the CLI from a fresh clone:
git clone https://github.com/normanormata/westminster_cli.git
cd westminster_cli
uv run ws
That opens the interactive terminal session. You can also run one-shot commands without installing globally:
uv run ws stats
uv run ws wcf 1
uv run ws wsc 1 --question
To install ws as a command you can run from anywhere:
uv tool install git+https://github.com/normanormata/westminster_cli.git
Then run:
ws
ws stats
ws wcf 1
If you cloned the repo and want your local edits to take effect while you work on the CLI, install it in editable mode from inside the project folder:
uv tool install -e .
Run locally
uv run ws
uv run ws --help
Running ws with no arguments opens an interactive terminal session. Inside it,
type / to see live slash-command suggestions, use arrow keys to select a
command template, run commands without the ws prefix, and type exit to quit.
Plain commands such as wcf, search, and stats also complete while typing.
Completion is context-aware: after a document id (wsc ) it suggests references,
and after a reference it suggests --question/--answer. Command history persists
across sessions, and a bottom toolbar shows quick hints and corpus counts.
Use quiz for an interactive flashcard session: it shows a question, waits for
Enter to reveal the answer, records whether you got it, and prints a running score.
Type s to skip a card or q to stop early. Pass a document id and question
count to shape the session, e.g. ws quiz wlc 20 (defaults: wsc, 10 questions).
Pass -p/--proofs to any reading command (ws wsc 1 -p, ws wcf 1.1 -p,
ws wcf 1 -p) to show the OPC scripture proof texts beneath the text,
lettered to match the printed edition. It combines with -q/-a, and /p wsc 1
works as a slash alias.
Pass -m/--mesv to read the 2025 Modern English Study Version instead
(ws wsc 1 -m, ws wcf 1.1 -m, /m wsc 1), or --compare to see the
constitutional and MESV texts together. -m combines with -q/-a
(modern question or answer only) and -p.
UV creates and syncs the project environment automatically from pyproject.toml
and uv.lock.
The repo also includes direct wrappers if you want to run without syncing a UV environment:
./ws --help
./westminster --help
./wsc show wsc 1
Commands
uv run ws list
uv run ws list wsc
uv run ws wsc 1
uv run ws wsc 1 --question
uv run ws wsc 1 --answer
uv run ws wsc 1 --proofs
uv run ws wsc 1 --mesv
uv run ws wsc 1 --compare
uv run ws wcf 1
uv run ws wcf 1.1
uv run ws wcf 1.1 -p
uv run ws wcf 1.1 -m
uv run ws search "chief end"
uv run ws quiz
uv run ws quiz wlc 20
uv run ws stats
uv run ws sources
uv run ws clear
Slash command discovery and aliases:
uv run ws /
uv run ws /wcf 1
uv run ws /wsc 1 --question
uv run ws /q wsc 1
uv run ws /a wlc 1
uv run ws /p wsc 1
uv run ws /m wsc 1
uv run ws /stats
uv run ws /clear
The explicit show command still works:
uv run ws show wcf 1
uv run ws show wsc 1
The full command name still works:
uv run westminster stats
After installing the tool, both names are available:
ws stats
westminster stats
wsc show wsc 1
Test
uv run python -m unittest discover -s tests
Rebuild the OPC corpus
curl -L https://opc.org/wcf.html -o /tmp/opc-wcf.html
curl -L https://opc.org/lc.html -o /tmp/opc-lc.html
curl -L https://opc.org/sc.html -o /tmp/opc-sc.html
python3 scripts/build_opc_corpus.py /tmp/opc-wcf.html /tmp/opc-lc.html /tmp/opc-sc.html
Rebuild the scripture proofs
The proof references come from the OPC "with Scripture proofs" PDFs linked from https://opc.org/confessions.html. After rebuilding the corpus, re-merge them:
curl -L https://opc.org/documents/CFLayout.pdf -o /tmp/CFLayout.pdf
curl -L https://opc.org/documents/LCLayout.pdf -o /tmp/LCLayout.pdf
curl -L https://opc.org/documents/SCLayout.pdf -o /tmp/SCLayout.pdf
uv run python scripts/add_scripture_proofs.py /tmp/CFLayout.pdf /tmp/LCLayout.pdf /tmp/SCLayout.pdf
The script validates that every superscript proof marker in the body text pairs with a lettered footnote and reports per-document counts before writing.
Rebuild the MESV text
The 2025 Modern English Study Version comes from the OPC PDFs linked from https://opc.org/confessions.html:
curl -L https://opc.org/documents/2025_Modern_English_Study_Version_of_The_Confession_of_Faith.pdf -o /tmp/mesv_cf.pdf
curl -L https://opc.org/documents/2025_Modern_English_Study_Version_of_The_Larger_Catechism.pdf -o /tmp/mesv_lc.pdf
curl -L https://opc.org/documents/2025_Modern_English_Study_Version_of_The_Shorter_Catechism.pdf -o /tmp/mesv_sc.pdf
uv run python scripts/add_mesv.py /tmp/mesv_cf.pdf /tmp/mesv_lc.pdf /tmp/mesv_sc.pdf
The script validates that the MESV refs exactly match the constitutional corpus (33 chapters / 171 sections, 196 and 107 questions) before writing.
Data format
Each document has an id, title, short name, and entries:
{
"id": "wsc",
"title": "Westminster Shorter Catechism",
"short_title": "Shorter Catechism",
"source": "Orthodox Presbyterian Church constitutional text",
"source_url": "https://opc.org/sc.html",
"entries": [
{
"ref": "1",
"kind": "qa",
"question": "What is the chief end of man?",
"answer": "Man's chief end is to glorify God, and to enjoy him forever."
}
]
}
For confession paragraphs, use kind: "section" with heading and text.
Entries may also carry an optional proofs list of scripture proof references,
each with the OPC footnote letter and its references:
"proofs": [
{ "letter": "a", "references": ["Ps. 86:9", "Rom. 11:36"] }
]
Entries may also carry the 2025 MESV text in parallel fields:
question_mesv/answer_mesv for catechism entries, and
text_mesv/heading_mesv for confession sections.
Project details
Release history Release notifications | RSS feed
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 westminster_standards_cli-0.1.0.tar.gz.
File metadata
- Download URL: westminster_standards_cli-0.1.0.tar.gz
- Upload date:
- Size: 144.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaa53cad9d726bc865c5e0bc41029ed200dce09fb466746319a354d9e535a9aa
|
|
| MD5 |
ccc646ddaeb28f6c08d2687e3692f99d
|
|
| BLAKE2b-256 |
afb7a8adf18f3d8d73334c4f07d1b341a54620342e7b9a5d58cdc34b993cd31e
|
File details
Details for the file westminster_standards_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: westminster_standards_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 140.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a474a8795e9c8e198d4779848f3aee1a39480a273db532ed159478ffd59d7db
|
|
| MD5 |
f0fd98e9d25c38ff03324da1cb7eb16c
|
|
| BLAKE2b-256 |
de8cdeda887530cd042cb4d3734d05e543577b4fff7f7273c0054c3ed78003d7
|