Skip to main content
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.

Installation

Pre-built binaries for macOS, Linux, and Windows are available on GitHub Releases.

Verify installation

Shell

Authentication

The CLI reads your API key from the CASEDEV_API_KEY environment variable. Get your key from the Case.dev dashboard.
Shell
Add the export to your shell profile (~/.bashrc, ~/.zshrc, etc.) so it persists across sessions.
API keys starting with sk_case_ are production keys. Development keys are available for testing.

Quick Start

Shell
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.

Command Structure

Commands follow a resource[:version][:sub] action pattern that mirrors the API. Resource names use colons, not slashes:
Shell
List all available resources with casedev --help, and inspect a resource’s subcommands with casedev <resource> --help:
Shell

Output Formats

Control how results are displayed with the --format global flag (auto, explore, json, jsonl, pretty, raw, yaml):
Shell
JSON output works well with tools like jq:
Shell
You can also reshape output with the --transform flag, which accepts a GJSON path:
Shell

File uploads

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:
  1. Request a presigned upload URL from the vault (casedev vault upload ...).
  2. PUT the file bytes to that URL (e.g. with curl).
  3. Confirm the upload to record the final size and ETag (casedev vault confirm-upload ...).
  4. Trigger ingestion if your vault has indexing enabled (casedev vault ingest ...).
Upload a local PDF to a vault
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.

OCR and voice transcription with local files

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
Transcribe a local audio file via vault

Piping and stdin

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:
Shell

Shell completions

Enable tab completions for your shell:
Shell
Restart your shell or source the completion file to activate.

Debugging

Use --debug to see full HTTP request and response details:
Shell
This prints request headers, body, response status, and timing information to stderr.
Debug output may contain your API key and sensitive request payloads. Redact credentials and confidential data before sharing logs externally.

Upgrading

Repositories

Next Steps

SDKs

Official client libraries for TypeScript, Python, and Go

API Reference

Complete API documentation with interactive examples

Getting Started

Integration tutorials with step-by-step examples