Skip to main content

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

Install the CLI from PyPI:

uv tool install westminster-standards-cli

Then run:

ws
ws stats
ws wcf 1
ws wsc 1 --question

uv installs the CLI and its Python dependencies, including prompt_toolkit, from the package metadata.

Development Install

To try the CLI from a fresh clone without installing it globally:

git clone https://github.com/normanormata/westminster_cli.git
cd westminster_cli
uv run ws

You can also run one-shot commands from the clone:

uv run ws stats
uv run ws wcf 1
uv run ws wsc 1 --question

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).

search matches entries containing all of the given terms; pass -r/--regex to treat the query as a single case-insensitive regular expression instead (ws search --regex "bapti[sz]ed?").

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 search --regex "bapti[sz]ed?"
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.

Metadata

Release files for westminster-standards-cli 0.2.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 westminster-standards-cli 0.2.0
File Size Uploaded Provenance Actions
westminster_standards_cli-0.2.0.tar.gz 145.0 kB Without provenance Details for westminster_standards_cli-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for westminster-standards-cli 0.2.0
File Interpreter ABI Platform Actions
westminster_standards_cli-0.2.0-py3-none-any.whl Python 3 none any Details for westminster_standards_cli-0.2.0-py3-none-any.whl

Total release size: 285.9 kB

Release files / westminster_standards_cli-0.2.0.tar.gz

Download URL westminster_standards_cli-0.2.0.tar.gz
Size 145.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c005576dc8014776de82a701699f582e78e5f16e3841bb4f57027b65ee4a7f48
BLAKE2b-256 checksum
How to use checksums
c30f1592e291dace9d3cbfc9c5257601638378a5bf075833d593ebaa7e51cb3f
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / westminster_standards_cli-0.2.0-py3-none-any.whl

Download URL westminster_standards_cli-0.2.0-py3-none-any.whl
Size 141.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
867916d417444b02b9f76cf119125451184f1c9d5a60c61b012efd6182195a30
BLAKE2b-256 checksum
How to use checksums
a6e58ba575a5b614452aec20a20cfb4f36ddbfccca2626d73cb56206c931697e
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for westminster-standards-cli 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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