OpenCaseLaw research CLI
ocl checks Swiss case citations against the open OpenCaseLaw corpus (over a
million published decisions of the Federal Supreme Court and the cantonal
courts, federal and cantonal statutes) and keeps the evidence behind a memo.
Dependency-free Python 3.10+; JSON when piped, readable text at a terminal.
pipx install opencaselaw-cli # or: uv tool install opencaselaw-cli
Windows installer. For machines without Python, each release ships
OpenCaseLaw-CLI-<version>-setup.exe: the python.org runtime plus this
package under Program Files\OpenCaseLaw, ocl.cmd, a "Send to" entry
"Entwurf prüfen (offline)" and a Start-menu entry for ocl pack pull. Built
by .github/workflows/installer-cli.yml from installer/; notes for court IT
(allow-listing, mirrors, verification) in docs/court-it-install.md.
Two jobs
Check a draft as it is: ocl check memo.docx reads the Word file
(footnotes included), finds the citations and the quotations next to them,
checks every one, and writes memo.check.html next to the draft with what
held and what needs attention.
Check a list of citations, written the way lawyers write them:
ocl citations resolve 'BGE 136 III 513 E. 2.3' 'BGer 4A_747/2012 vom 5. April 2013' \
'Obergericht ZH LA210005 vom 15. Juni 2021' 'BGE 999 III 1'
Each reference comes back resolved, pinpoint_unavailable, discrepancy
(the decision exists but the date or docket written next to it is wrong),
missing, ambiguous or unrecognized, with the service's own citation
strings and the verbatim text of the cited Erwägung. The rule behind it: the
decision the service proposes must carry the label the author wrote; nothing
is ever substituted, and no citation string is built by the client.
Check the quotations against the served text (exact, near with the
differing spans, or not_found):
ocl quotes check 'BGE 136 III 513 E. 2.3' --quote "le contrat de travail conclu pour une durée indéterminée"
Keep the evidence behind a memo:
ocl bundle create 'Rachekündigung Art. 336 OR' --max-results 10 --passage 2 --law OR:336 --out evidence
ocl bundle verify evidence
A bundle folder holds the selected decisions (JSON and plain text), the named
Erwägungen and statute articles, a plain-language INDEX.md, and a
manifest.json with every request, timestamp, source link and SHA-256.
Also: ocl decisions search, ocl decisions get, ocl decisions passage,
ocl laws get, ocl citations list, ocl cite. ocl <command> --help has
examples for each.
For agents
ocl agent-guide prints the contract on one page: JSON when piped, exit
codes that carry the verdict (0 resolved, 2 invalid input, 3 transport, 4
something did not resolve), --cache DIR for free repeats within a server
generation, and the rules (citation strings and quotations only from the
service). ocl tool list|schema|call reaches every research tool of the
service with its structured output. Three skills ship in the package
(citation-check, research, evidence-bundle): ocl skills install --claude copies them into Claude Code's skills directory, --dir anywhere
else. opencaselaw_cli.api offers the same as a library. For confidential
drafts, ocl pack pull fetches the weekly verification pack and
ocl --local check memo.docx (or ocl --local ... for the other check
commands; --pack PATH for a pack stored elsewhere) runs the citation,
pinpoint and quotation checks on this machine only.
Scope
Existence, identity and wording only. The tool never says that a decision supports a proposition, is still good law, or fits the facts. Results come from a hosted corpus that is rebuilt nightly, not from an offline snapshot; keep the returned source links and pagination metadata with your work.
Guide: https://opencaselaw.ch/research-cli.md · Site: https://opencaselaw.ch/cli/ ·
Changelog: CHANGELOG.md. Commands contact https://mcp.opencaselaw.ch by
default; --base-url accepts another origin. Defaults can live in
~/.config/ocl/config or OCL_* variables; ocl completion zsh|bash|fish
prints a completion script. The client spaces requests by at least 200 ms,
retries at most twice by default and respects Retry-After up to 30 seconds.
Metadata
Release files for opencaselaw-cli 0.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opencaselaw_cli-0.9.2.tar.gz | 178.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opencaselaw_cli-0.9.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 302.3 kB
Release files / opencaselaw_cli-0.9.2.tar.gz
| Download URL | opencaselaw_cli-0.9.2.tar.gz |
|---|---|
| Size | 178.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7a0260ab70e06e627cfa55180cd47ddeee8988cf0142ab0891e2a953e4c031a
|
|
BLAKE2b-256 checksum How to use checksums |
fede412e2dc5f4775c2a2604c9f7c300de3b721f22ea411d6bf3e63fc65446c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logRelease files / opencaselaw_cli-0.9.2-py3-none-any.whl
| Download URL | opencaselaw_cli-0.9.2-py3-none-any.whl |
|---|---|
| Size | 123.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cbb48a295b1372838f956ce364c53e6e394b62c11bc44c0f74f5613b8f30cfc
|
|
BLAKE2b-256 checksum How to use checksums |
812167ebce6ba3e9a9f34b14b6aa49f8ed3ea73496e281cb4d3aef250709a63d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency log