Use the command line¶
The bharat-judgements CLI exposes selected SDK workflows and structured JSON output. Install cli plus the backend extras you need.
Global options¶
Place global options before the command group:
bharat-judgements --json find --court sci --year 2020 --limit 10
bharat-judgements --verbose hcservices benches delhi
| Option | Behaviour |
|---|---|
--json | Structured JSON instead of human-readable tables |
--verbose, -v | INFO-level SDK logging |
--captcha-attempts | Budget for judgments and Calcutta flows; default five |
--version | Installed package version |
The global CAPTCHA budget also configures HC/district clients. Logs and errors may appear separately from JSON; check the command's exit code before importing its output.
Command map¶
| Group | Commands | Use |
|---|---|---|
| Top level | version, courts, install-skills, find | Offline checks, registry, skill copy and facade search |
hcservices | benches, case-types, search, search-by-party, orders, cause-list | High Court portal workflows |
districtcourts | states, districts, complexes, establishments, case-types, courts, search, search-by-party, orders, cause-list | Location discovery and district queries |
calcuttahc | search | Case orders from the court website |
judgments | search, search-all | Live text search and PDF downloads |
sci | recent | SCI homepage feed and PDFs |
archive | query, get, download, cache, count | Historical search, PDFs and cache operations |
Use bharat-judgements GROUP COMMAND --help for the installed version's exact flags. The CLI does not expose every SDK operation, including CNR case detail and advocate workflows.
Find judgments¶
bharat-judgements --json find --court sci --judge chandrachud --year 2018-2024 --limit 10
bharat-judgements --json find --text "right to privacy" --source live --limit 10
--year accepts a single year or inclusive range. Structured filters route to archive; text alone routes to the live High Court judgment portal. Mixed text and structured filters use archive title/party matching. A forced live query requires text and does not enforce structured filters. See routing.
High Court discovery and search¶
bharat-judgements hcservices benches delhi
bharat-judgements hcservices case-types delhi --bench 1
bharat-judgements --json hcservices search-by-party delhi --party tata --year 2024
Number-based search and orders require a returned numeric --case-type, --case-number and registration --year. orders --download DIRECTORY saves available PDFs. cause-list takes --date in DD-MM-YYYY, optional --bench, and --criminal for criminal lists.
District court discovery¶
Start with bharat-judgements districtcourts states. Select returned codes through districts --state, complexes --state --dist, and establishments --state --dist --complex. Use case-types and courts with that selection before querying cases or cause lists.
Number searches require location codes, case type, number and year. Party searches require location codes, party and year. Add --est when an establishment is needed. cause-list also needs --court-no; its display name can be auto-resolved. See the district guide.
Calcutta orders¶
bharat-judgements calcuttahc search --case-type 12 --case-number 12886 --year 2024 --establishment appellate --download orders
This is an example query, not a fixed result. Inspect returned case metadata and download failures.
Live judgment search and SCI feed¶
bharat-judgements --json judgments search --text "right to privacy" --page-size 10
bharat-judgements judgments search-all --text bail --max-pages 2 --download judgments
bharat-judgements --json sci recent --limit 5
Pass --court-type 3 to judgments search or judgments search-all for SCR, and 2 for High Courts. search-all --max-pages 0 means no page cap; keep a positive bound for a trial run. sci recent --download DIRECTORY saves available feed PDFs.
Archive research and retrieval¶
bharat-judgements --json archive query --court delhi --year 2020 --party tata --limit 10
bharat-judgements --json archive count --court delhi --year 2020
bharat-judgements archive cache
archive get --cnr IDENTIFIER --pdf --out PATH retrieves an archive PDF; replace the identifier and path with values from your own query. SCI PDFs can trigger a yearly tar download. archive download --court sci --year YEAR prefetches that tar; HC prefetch is not implemented by this command. archive cache --clear deletes the archive cache directory.
Save records for another tool¶
JSON shapes vary by command: some return a list, others a result envelope or dictionary. Inspect the schema before automating an import. PDF downloads go to files; JSON is metadata, not full document text.
install-skills copies bundled instructions into .claude/skills/bharat-judgements/ in the current folder and overwrites existing bundled files. It does not enable an assistant, create a server or verify network access.
Next: Python quickstart, source coverage, or API reference.