Skip to main content

CLI for Cased telemetry - query errors, metrics, and traces

Project description

Cased CLI

Query telemetry and AI agent sessions from your terminal. Designed for use with Claude Code.

Installation

uv tool install cased-cli

Or with pip:

pip install cased-cli

Configuration

Browser Authentication (Recommended)

cased configure

This will:

  1. Display a verification code (e.g., ABCD-1234)
  2. Open your browser to https://app.cased.com/cli/verify
  3. Enter the code and authorize access
  4. Save credentials to ~/.config/cased/config.json

Environment Variables (Alternative)

For CI/CD or scripts, set your API key directly:

export CASED_API_KEY=your_api_key_here
export CASED_API_URL=https://app.cased.com  # optional, defaults to this

Get an API key from: https://app.cased.com/settings/api

Usage

Query Errors

# Recent errors
cased errors --since 24h

# Search for specific errors
cased errors --search "KeyError" --level error

# Output as JSON (for piping to other tools)
cased errors --since 1h --json

Query Traces

# Recent traces
cased traces --since 1h

# Filter by service
cased traces --service demo-web --status error

# Get all spans for a specific trace
cased traces --trace-id abc123...

Query Metrics

# Recent metrics
cased metrics --since 1h

# Filter by pod
cased metrics --pod my-pod-abc123

# Filter by metric type
cased metrics --metric cpu_percent --namespace default

Overview

# Get statistics summary
cased stats

# List clusters
cased clusters

Agent Sessions

# List recent sessions
cased sessions --since 24h

# Filter by status
cased sessions --status completed
cased sessions --status failed

# Filter by type
cased sessions --type root_cause_analysis

# Get session details
cased session <session_id>

# View session logs and conversation
cased session <session_id> --logs
cased session <session_id> --conversation

Source Maps

Upload source maps to de-minify JavaScript stack traces:

# Upload source maps for a release
cased sourcemaps upload -p my-project -r v1.2.3 dist/*.map

# List uploaded source maps
cased sourcemaps list -p my-project

# Delete source maps for a release
cased sourcemaps delete -p my-project -r v1.2.3

With Claude Code

Skill (Recommended)

Copy the .claude/skills/cased directory to your project. Claude will automatically use the Cased CLI when you ask about errors, traces, metrics, or agent sessions.

Slash Command

Add to your project's .claude/commands/telemetry.md:

Query telemetry using the Cased CLI. The user wants to investigate errors, traces, metrics, or agent sessions.

Available commands:
- `cased errors --since <time> [--level <level>] [--search <term>]`
- `cased traces --since <time> [--service <name>] [--status <ok|error>]`
- `cased metrics --since <time> [--pod <name>] [--metric <name>]`
- `cased sessions --since <time> [--status <status>]`
- `cased session <id> [--logs] [--conversation]`
- `cased stats` - Get overview
- `cased clusters` - List clusters

Use `--json` flag when you need to process the output programmatically.

Then: /telemetry investigate the errors from the last hour

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cased_cli-0.2.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cased_cli-0.2.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file cased_cli-0.2.0.tar.gz.

File metadata

  • Download URL: cased_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for cased_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c4bb0d7914d25357701e2d76167bb94af5e8255f6d7d7927f59ea6b05ce9c0ed
MD5 ed07e6e52af1d5916afdf04348ad2d91
BLAKE2b-256 8c688cbafc636edcb5d04bba7e80b1f2f16aea58a7c8d1e54f63801216b16219

See more details on using hashes here.

File details

Details for the file cased_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cased_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for cased_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e102d5f122994b6d9bf42eafbeab8b1312327f0976ce5a9ad0acbc98138cae5e
MD5 84059a8ad98216ebec5a3a300e891541
BLAKE2b-256 ff77ee32cd9b402a1d10b51213909cf0b0999f340f205cb18c9f2c04ed5bf57b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page