Skip to content

CLI Commands

Terminal window
midlyr regulations browse --query "provisional credit" --authorities cfpb

Calls GET /api/v1/regulations.

Terminal window
midlyr regulations read 01HXZ3K4M7QR9VP2N8WYJF5GTB

Calls GET /api/v1/regulations/{id} and returns the document’s metadata, total size, and table of contents.

Terminal window
midlyr regulations content 01HXZ3K4M7QR9VP2N8WYJF5GTB --offset 0 --limit 40000

Calls GET /api/v1/regulations/{id}/content and returns a slice of the document’s plain text.

Terminal window
midlyr analysis screen \
--scenario dispute \
--text "we can't provide a provisional dispute credit until the investigation is completed"

Calls POST /api/v1/analysis/screen and returns a job id. --scenario is required; valid values are marketing_asset, dispute, debt_collection, complaint, and generic.

Terminal window
midlyr jobs get job_01HY3K4M7QR9VP2N8WYJF5GTB

Calls GET /api/v1/jobs/{id} and returns the current status plus typed result when complete.

Terminal window
JOB_ID=$(midlyr analysis screen \
--scenario dispute \
--text "we can't provide a provisional dispute credit until the investigation is completed" \
--json | jq -r '.id')
midlyr jobs get "$JOB_ID"