Research CLI · ocl
Check citations and keep evidence from the command line
Install
pipx install opencaselaw-cli # or: uv tool install opencaselaw-cli ocl --help
1. Check the citations in a draft
cat > references.jsonl <<'JSONL'
{"reference":"BGE 136 III 513","pinpoint":"2.3"}
{"reference":"4A_747/2012"}
{"reference":"BGE 999 III 1"}
{"reference":"BGE 140 III 86","pinpoint":"2.3"}
JSONL
ocl citations resolve --input references.jsonl
At a terminal this prints:
resolved BGE 136 III 513 bge_BGE_136_III_513 E. 2.3 retrieved resolved 4A_747/2012 bger_4A_747_2012 BGer 4A_747/2012 vom 5. April 2013 missing BGE 999 III 1 not in the corpus pinpoint_unavailable BGE 140 III 86 bge_BGE_140_III_86 E. 2.3 not in the index partial: 2 resolved, 1 missing, 1 pinpoint_unavailable. Existence and pinpoints only; no assessment of legal support.
2. Keep the evidence behind a memo
ocl bundle create 'Rachekündigung Art. 336 OR' --max-results 10 --passage 2 \ --law OR:336 --out rachekuendigung-2026-09
The folder is readable without any tool:
rachekuendigung-2026-09/ INDEX.md what was saved, in plain language manifest.json every request, timestamp, hash, source link decisions/bge_BGE_136_III_513-5b3e22ef.txt full text as served (+ .json metadata) passages/bge_BGE_136_III_513_2-ff487655.txt E. 2, verbatim laws/OR_336-812a5382.json Art. 336 OR, consolidation date, Fedlex link search/page-0000-1850ce82.json the search page the selection came from
What the results mean
Recipes
ocl decisions search 'Rachekündigung Art. 336 OR' --max-results 5 --format jsonl | ocl decisions get --stdin --format jsonl > decisions.jsonl
ocl decisions search --court bge --date-from 2026-01-01 --date-to 2026-06-30 \ --sort date_desc --max-results 500 --format jsonl > bge-2026-h1.jsonl
ocl decisions passage bge_BGE_136_III_513 2.3 ocl cite 'BGE 136 III 513' --pinpoint 2.3 --language fr
ocl laws get OR --article 41 --as-of 2015-01-01
ocl citations list bge_BGE_140_III_86 --direction incoming --limit 50