Get the FREE Ultimate OpenClaw Setup Guide →

setup

Use Caution
npx machina-cli add skill CaseMark/legal-plugin/setup --openclaw
Files (1)
SKILL.md
4.0 KB

case.dev CLI

The casedev CLI is the interface to case.dev, a legal AI platform providing encrypted document vaults, production OCR, audio transcription, and legal/web/patent search.

This skill covers installation, authentication, diagnostics, and general CLI usage. For domain-specific workflows, see the companion skills: vaults, ocr, transcription, search.

Installation

# macOS (Homebrew)
brew install casemark/casedev/casedev

# macOS + Linux (shell script)
curl -fsSL https://raw.githubusercontent.com/CaseMark/homebrew-casedev/main/install.sh | sh

Or run the bundled setup script:

bash scripts/setup.sh

Verify: casedev --version

Authentication

Three methods, in order of preference:

# 1. Environment variable (best for agents)
export CASE_API_KEY=sk_case_YOUR_KEY

# 2. Store key in config
casedev auth set-key --api-key sk_case_YOUR_KEY

# 3. Browser device-flow login (interactive, use --no-open for headless)
casedev auth login --no-open

Check auth status:

casedev auth status --json

Logout:

casedev auth logout

API keys start with sk_case_. Config is stored at ~/.config/case/config.json.

Diagnostics

Run casedev doctor to check connectivity, service health, and auth:

casedev doctor --json

Checks: API URL format, root reachability, vault/OCR/voice/compute/skills health endpoints, API key validity. Use --strict to fail on warnings.

Focus (Default Targets)

Set default vault/object/project so you can omit --vault flags:

# Set focus
casedev focus set --vault VAULT_ID --object OBJECT_ID --project PROJECT_ID

# Show current focus
casedev focus show --json

# Clear
casedev focus clear --vault
casedev focus clear --all

Job Tracker

Unified job tracker for OCR and transcription jobs:

# List all tracked jobs (auto-refreshes status)
casedev jobs list --json

# Filter
casedev jobs list --type ocr --status completed --json
casedev jobs list --type transcribe --vault VAULT_ID --json

# Get details
casedev jobs get JOB_ID --type ocr --json

# Watch until complete
casedev jobs watch JOB_ID --type transcribe --interval 5 --timeout 600 --json

Use --no-refresh on jobs list to skip live status checks.

API Routes

Browse and call any case.dev API endpoint by operationId:

# List available routes
casedev routes list --json
casedev routes list --tag vault --json
casedev routes list --search "upload" --json

# Call by operationId
casedev call getVaultList --json
casedev call createVault --body '{"name":"test"}' --json
casedev call getVaultObjects --param vaultId=VAULT_ID --json

Raw API Access

For endpoints not covered by named commands:

casedev api GET /vault --json
casedev api POST /vault --body '{"name":"new-vault"}' --json
casedev api GET /ocr/v1/health --no-auth --json
casedev api POST /legal/v1/find --body '{"query":"breach of contract"}' --json

Flags: --header "name:value", --no-auth, --body <json>.

Global Flags

All commands accept:

  • --json — machine-readable JSON output (always use this in agent workflows)
  • --api-url <url> — override API base URL
  • --api-key <key> — override API key for this invocation

Troubleshooting

"No API key set": Run casedev auth set-key --api-key sk_case_... or set CASE_API_KEY env var.

Doctor shows FAIL on a health check: The specific service may be temporarily unavailable. Check the message for which service (vault, OCR, voice, compute).

"Invalid API key format": Keys must start with sk_case_.

Auth login times out: Use --timeout 120 for slower connections, or use auth set-key instead.

Source

git clone https://github.com/CaseMark/legal-plugin/blob/main/setup/SKILL.mdView on GitHub

Overview

Installs and configures the casedev CLI for legal AI workflows, including document vaults, OCR, transcription, and search. This gateway skill handles installation, authentication, diagnostics, focus targets, API routing, and raw API access for all case.dev workflows.

How This Skill Works

Install the CLI via Homebrew or a bundled script, verify the installation with casedev --version, then authenticate using an environment variable, stored config, or interactive login. The CLI then provides commands for diagnostics, focusing targets, job tracking, API routes, and raw API calls to perform case.dev tasks.

When to Use It

  • You mention case.dev or casedev and need to authenticate or get started with the CLI.
  • You want to run diagnostics to verify connectivity, service health, and auth status.
  • You want to set a default vault, object, or project to simplify subsequent commands.
  • You want to browse, list, or call case.dev API routes, or perform a raw API call.
  • You need to monitor OCR/transcription jobs via the unified Job Tracker.

Quick Start

  1. Step 1: Install via brew install casemark/casedev/casedev or run the bundled setup script and verify with casedev --version
  2. Step 2: Authenticate using CASE_API_KEY, casedev auth set-key, or casedev auth login, then check auth status
  3. Step 3: Try a simple task like casedev doctor --json or casedev routes list --json

Best Practices

  • Use the environment variable CASE_API_KEY for headless automation and agents.
  • Run casedev doctor --json regularly to verify connectivity and health.
  • Always use --json for machine-readable output in automation workflows.
  • Set a default focus with casedev focus set to reduce repetitive flags.
  • When a needed endpoint isn’t covered by named commands, fall back to casedev api or raw API calls.

Example Use Cases

  • Install the CLI on macOS and verify the installation with casedev --version.
  • Authenticate using CASE_API_KEY and confirm status with casedev auth status --json.
  • Diagnose environment health with casedev doctor --json.
  • Set a default vault/project via casedev focus set to streamline subsequent commands.
  • List routes or call an endpoint by operationId with casedev routes list or casedev call.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers