OpenCaseLaw research CLI
Dependency-free Python 3.10+ client for the public, read-only research API.
Install from the repository with pipx install ./clients/python (or
uv tool install ./clients/python); both create the isolated environment
that current Python installations require. Without them, use a virtual
environment: python3 -m venv .venv && .venv/bin/pip install ./clients/python.
This package does not install scraper/server dependencies or a local corpus.
ocl --help
ocl citations resolve 'BGE 136 III 513' '4A_747/2012' # do these exist, and which decisions are they?
ocl bundle create 'Rachekündigung Art. 336 OR' --max-results 10 --passage 2 --law OR:336 --out evidence
ocl decisions search 'Rachekündigung' --max-results 5 --format jsonl | ocl decisions get --stdin --format jsonl > decisions.jsonl
ocl decisions passage bge_BGE_136_III_513 2.3
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 file hash.
See the repository's research CLI guide
for provenance, batch inputs, pagination, partial failures and repeatable workflows.
Commands contact https://mcp.opencaselaw.ch by default; --base-url accepts an
alternative HTTP(S) origin. Results come from a changing hosted corpus, not an
offline snapshot. Preserve returned source evidence and pagination metadata.
Exit codes: 0 success (including a bounded selection); 2 invalid input; 3 API
or transport failure; 4 partial or unresolved result; 130 interruption.
At a terminal the output is readable text (--color never or NO_COLOR for
plain text); piped, or with --format json|jsonl, it is JSON on stdout;
table, csv and md are for documents. Defaults can live in
~/.config/ocl/config or OCL_* variables; ocl completion zsh|bash|fish
prints a completion script. Diagnostics go to stderr. The client retries at most
twice by default, spaces requests by at least 200 ms, and respects Retry-After
up to 30 seconds; longer server delays fail without an early retry.
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.2.0.tar.gz.
File metadata
- Download URL: opencaselaw_cli-0.2.0.tar.gz
- Upload date:
- Size: 48.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6faf56e7224227e62015f5dfd0dd076cf88699c2b33f39d40438ac639f0957a7
|
|
| MD5 |
c5d667b8a8aa35fb42be07379b217207
|
|
| BLAKE2b-256 |
e8afa7cdda5bccb029416be27bb29b5cba2de0d000bf0ae41145ed9eafe5ab2b
|
Provenance
The following attestation bundles were made for opencaselaw_cli-0.2.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.2.0.tar.gz -
Subject digest:
6faf56e7224227e62015f5dfd0dd076cf88699c2b33f39d40438ac639f0957a7 - Sigstore transparency entry: 2727523028
- Sigstore integration time:
-
Permalink:
jonashertner/opencaselaw@dc82e6b43a33d3fb246a04b534cfe6870b8e32b7 -
Branch / Tag:
refs/tags/cli-v0.2.0 - Owner: https://github.com/jonashertner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-cli.yml@dc82e6b43a33d3fb246a04b534cfe6870b8e32b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file opencaselaw_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: opencaselaw_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 37.1 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 |
46943907f43208fecb4bfa885dba69ff3b6d712655ff1ba32691981a467cc530
|
|
| MD5 |
3c852187a86d9970cbde730fa76db68e
|
|
| BLAKE2b-256 |
91c1e6086a6ba786f82b7dc23b2193a082e2be868c9205e763f03474290dc11c
|
Provenance
The following attestation bundles were made for opencaselaw_cli-0.2.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.2.0-py3-none-any.whl -
Subject digest:
46943907f43208fecb4bfa885dba69ff3b6d712655ff1ba32691981a467cc530 - Sigstore transparency entry: 2727523078
- Sigstore integration time:
-
Permalink:
jonashertner/opencaselaw@dc82e6b43a33d3fb246a04b534cfe6870b8e32b7 -
Branch / Tag:
refs/tags/cli-v0.2.0 - Owner: https://github.com/jonashertner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-cli.yml@dc82e6b43a33d3fb246a04b534cfe6870b8e32b7 -
Trigger Event:
push
-
Statement type: