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:
- Display a verification code (e.g.,
ABCD-1234) - Open your browser to https://app.cased.com/cli/verify
- Enter the code and authorize access
- 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
Upload Documentation
Upload documents to the Cased knowledge base to help the AI understand your organization.
# Upload a file (title auto-generated from filename)
cased docs upload README.md
# Upload with custom title
cased docs upload --title "Deployment Guide" docs/deploy.md
# Upload from stdin
cat architecture.md | cased docs upload --title "Architecture" -
# Upload with AI cleanup (formats and structures content)
cased docs upload --cleanup meeting-notes.txt
# Upload conversation logs
cased docs upload --format conversation --cleanup session.log
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
Docs Upload Skill
Add to your project's .claude/skills/upload-docs.md:
Upload documentation to Cased knowledge base using the CLI.
Use `cased docs upload` to add documents that help the AI understand your codebase.
Commands:
- `cased docs upload <file>` - Upload a file (title from filename)
- `cased docs upload --title "Title" <file>` - Upload with custom title
- `cat <file> | cased docs upload --title "Title" -` - Upload from stdin
- `cased docs upload --cleanup <file>` - Upload with AI formatting
- `cased docs upload --format conversation <file>` - Upload conversation logs
Examples:
- Upload README: `cased docs upload README.md`
- Upload with cleanup: `cased docs upload --cleanup --title "Meeting Notes" notes.txt`
Then ask Claude: "Upload the architecture docs to Cased"
Metadata
Release files for cased-cli 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cased_cli-0.3.1.tar.gz | 24.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cased_cli-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.3 kB
Release files / cased_cli-0.3.1.tar.gz
| Download URL | cased_cli-0.3.1.tar.gz |
|---|---|
| Size | 24.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb4a67154a370bc9aae2921ae638b8019fa5f3b2441a4ac1bb08937c401b6f95
|
|
BLAKE2b-256 checksum How to use checksums |
87307b64bbd61db25de135f51ab32e39516f1e9036586b4ef90d52b68c3814a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / cased_cli-0.3.1-py3-none-any.whl
| Download URL | cased_cli-0.3.1-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a2022f15538562904a1a71c2c4479278b029a4b27cbc5054b946808833f6c2a
|
|
BLAKE2b-256 checksum How to use checksums |
92d982c85c2c91e956c23b42ae65250e46e89f7f5c218dae4c7689ed0a750854
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for cased-cli 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.