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
Two jobs
Check the citations in a draft, 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 ... 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.
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 opencaselaw_cli-0.6.0.tar.gz.
File metadata
- Download URL: opencaselaw_cli-0.6.0.tar.gz
- Upload date:
- Size: 101.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e5b9978f08e808416ab18a23cc0ee21620d11e8683378e21cabfe33771ccea3
|
|
| MD5 |
23f48bdc769de3f3dabb98ea5c05006f
|
|
| BLAKE2b-256 |
7a289443b108c9bc913fb5db09d61caf2a986888a2e0eddeb083ac249756ab07
|
Provenance
The following attestation bundles were made for opencaselaw_cli-0.6.0.tar.gz:
Publisher:
release-cli.yml on jonashertner/opencaselaw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opencaselaw_cli-0.6.0.tar.gz -
Subject digest:
5e5b9978f08e808416ab18a23cc0ee21620d11e8683378e21cabfe33771ccea3 - Sigstore transparency entry: 2739563969
- Sigstore integration time:
-
Permalink:
jonashertner/opencaselaw@edf63b2d6cce13f505684b22bbdb16023f22c509 -
Branch / Tag:
refs/tags/cli-v0.6.0 - Owner: https://github.com/jonashertner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-cli.yml@edf63b2d6cce13f505684b22bbdb16023f22c509 -
Trigger Event:
push
-
Statement type:
File details
Details for the file opencaselaw_cli-0.6.0-py3-none-any.whl.
File metadata
- Download URL: opencaselaw_cli-0.6.0-py3-none-any.whl
- Upload date:
- Size: 76.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16d377d7c3ca0df9361c8656804351cb6a6642df6479531139631ebfb11b904f
|
|
| MD5 |
cee45378ceefa071016dae6ee9cacc8b
|
|
| BLAKE2b-256 |
8cd127503382096ba3fbd6b5f203e0069398221b1f09ef03adaaac6faf6bd8d5
|
Provenance
The following attestation bundles were made for opencaselaw_cli-0.6.0-py3-none-any.whl:
Publisher:
release-cli.yml on jonashertner/opencaselaw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opencaselaw_cli-0.6.0-py3-none-any.whl -
Subject digest:
16d377d7c3ca0df9361c8656804351cb6a6642df6479531139631ebfb11b904f - Sigstore transparency entry: 2739564088
- Sigstore integration time:
-
Permalink:
jonashertner/opencaselaw@edf63b2d6cce13f505684b22bbdb16023f22c509 -
Branch / Tag:
refs/tags/cli-v0.6.0 - Owner: https://github.com/jonashertner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-cli.yml@edf63b2d6cce13f505684b22bbdb16023f22c509 -
Trigger Event:
push
-
Statement type: