# Claude Dashboard API

API tools for analyzing Claude Code usage, costs, and analytics.

## Overview

This repository contains three data-source applications plus debug tools (all require an Admin API key via `CLAUDE_ADMIN_KEY`):

1. **Usage** (`src/usage/`) - Fetches API usage data and deduces costs from token usage by API key (cost unit: dollars)
2. **Cost Report** (`src/cost_report/`) - Fetches direct cost data from the Cost Report API with workspace-level breakdowns (cost unit: cents)
3. **Analytics** (`src/analytics/`) - Fetches and analyzes Claude Code activity metrics per user
4. **Debug** (`src/debug/`) - Reconciliation and diagnostic scripts (e.g. `compare_costs.py`)

All apps share utilities in `src/shared/` (`api_client.py`, `date_utils.py`). Processed JSON is consumed by the React frontend in `../frontend`; see the root `../CLAUDE.md` for the end-to-end flow.

## Setup

```bash
# Install package with dev dependencies
make install-dev

# Or manually
uv sync
```

## Usage

See CLAUDE.md for detailed documentation and development commands.

## Output Directory

All applications output to `output/` relative to the project root.
