The Case.dev CLI (casedev) gives you full access to the Case.dev API from your terminal. Every API operation is exposed as a CLI command, making it easy to script workflows, test integrations, and manage resources without writing code.
# Chat with an LLMcasedev llm:v1:chat create-completion \ --model anthropic/claude-sonnet-4.6 \ --message '{"role":"user","content":"Summarize this contract..."}'# Search a vaultcasedev vault search \ --id vault_abc123 \ --query "termination clauses"# List available modelscasedev llm:v1 list-models# Run OCR on a document already accessible by URLcasedev ocr:v1 process --document-url https://example.com/contract.pdf# Transcribe audio already accessible by URLcasedev voice:transcription create --audio-url https://example.com/deposition.mp3
OCR and voice transcription accept URLs, not local file paths. To process a local file, upload it to a vault first (see File uploads below), then pass the vault-generated presigned URL — or the --vault-id / --object-id pair, where supported — into the processing command.
The CLI does not accept local file paths as a --file argument. Uploads happen directly to S3 via a short-lived presigned URL. The flow is always:
Request a presigned upload URL from the vault (casedev vault upload ...).
PUT the file bytes to that URL (e.g. with curl).
Confirm the upload to record the final size and ETag (casedev vault confirm-upload ...).
Trigger ingestion if your vault has indexing enabled (casedev vault ingest ...).
Upload a local PDF to a vault
VAULT_ID=vault_abc123FILE=./contract.pdfSIZE=$(wc -c < "$FILE" | tr -d ' ')# 1. Request a presigned upload URLUPLOAD=$(casedev vault upload \ --id "$VAULT_ID" \ --filename "contract.pdf" \ --content-type "application/pdf" \ --size-bytes "$SIZE" \ --auto-index \ --format json)OBJECT_ID=$(echo "$UPLOAD" | jq -r '.objectId')UPLOAD_URL=$(echo "$UPLOAD" | jq -r '.uploadUrl')# 2. Upload the bytes directly to S3curl -X PUT \ -H "Content-Type: application/pdf" \ --data-binary "@$FILE" \ "$UPLOAD_URL"# 3. Confirm the uploadcasedev vault confirm-upload \ --id "$VAULT_ID" \ --object-id "$OBJECT_ID" \ --success \ --size-bytes "$SIZE"# 4. Trigger ingestion (skip if --auto-index was not set or the vault is storage-only)casedev vault ingest --id "$VAULT_ID" --object-id "$OBJECT_ID"
For files larger than 5 GB, use casedev vault:multipart get-part-urls to obtain per-part presigned URLs and upload each part separately.See Vault uploads for the complete reference, including multipart uploads and error handling.
Neither ocr:v1 process nor voice:transcription create accept local file paths. Two paths work:
Already-hosted file: pass --document-url (OCR) or --audio-url (voice) pointing to a publicly reachable HTTPS URL or a presigned S3 URL.
Local file: upload it to a vault first (flow above), then either pass the vault’s presigned download URL or — for voice transcription — the --vault-id + --object-id pair directly.
OCR a local PDF via vault
# After the upload flow above:PRESIGNED=$(casedev vault:objects create-presigned-url \ --id "$VAULT_ID" \ --object-id "$OBJECT_ID" \ --operation GET \ --expires-in 3600 \ --transform 'presignedUrl')casedev ocr:v1 process --document-url "$PRESIGNED"
Transcribe a local audio file via vault
# Voice transcription can read directly from the vault without a presigned URL.casedev voice:transcription create \ --vault-id "$VAULT_ID" \ --object-id "$OBJECT_ID" \ --speaker-labels \ --punctuate
Most commands accept a JSON (or YAML) body on stdin. Any unset flag is filled from the stdin object, so you can compose commands without building long flag lists: