Skip to main content

Transparent HTTP proxy for monitoring Claude Code API traffic with TUI

Project description

cc-dump

Transparent HTTP proxy for monitoring Claude Code API traffic. Intercepts requests to the Anthropic API, tracks system prompt content across requests, and shows diffs when prompts change.

Install

uv tool install -e .

Usage

Reverse Proxy Mode (fixed target)

cc-dump [--port PORT] [--target URL]
ANTHROPIC_BASE_URL=http://127.0.0.1:3344 claude

Forward Proxy Mode (dynamic targets)

cc-dump --port 3344 --target ""
HTTP_PROXY=http://127.0.0.1:3344 ANTHROPIC_BASE_URL=http://api.minimax.com claude

In forward proxy mode, requests are sent as plain HTTP to cc-dump, inspected, then upgraded to HTTPS for the upstream API. Set ANTHROPIC_BASE_URL to an HTTP URL (not HTTPS) to avoid TLS tunneling.

Options

  • --port PORT - Listen port (default: 3344)
  • --target URL - Upstream API URL for reverse proxy mode (default: https://api.anthropic.com, use empty string for forward proxy mode)

What it shows

  • Full request details (model, max_tokens, stream, tool count)
  • System prompts with color-coded tracking tags ([sp-1], [sp-2], etc.)
  • Unified diffs when a prompt changes between requests
  • Message roles and content summaries
  • Streaming response text in real time

TUI Controls

The TUI provides keyboard shortcuts to toggle different views. Active filters are indicated by colored vertical bars (▌) at the start of filtered content:

  • h - Toggle Headers (cyan indicator) - Show/hide request/response headers
  • t - Toggle Tools (blue indicator) - Show/hide tool use and tool result blocks
  • s - Toggle System (yellow indicator) - Show/hide system prompts and tracked content
  • e - Toggle Context (green indicator) - Expand/collapse full content of system prompts and show detailed token breakdowns
  • m - Toggle Metadata (magenta indicator) - Show/hide model info, stop reasons, and other metadata
  • a - Toggle Stats - Show/hide token statistics panel
  • c - Toggle Cost - Show/hide per-tool token usage and cost aggregates
  • l - Toggle Timeline - Show/hide per-turn context growth timeline

Each type of filtered content has a colored vertical bar () indicator at the start of the line, making it easy to see which filter controls that content at a glance.

Active filters are shown in the filter status bar above the footer with their corresponding colored indicators.

No external dependencies — stdlib only.

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

cc_dump-0.2.0.tar.gz (261.9 kB view details)

Uploaded Source

Built Distribution

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

cc_dump-0.2.0-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cc_dump-0.2.0.tar.gz
Algorithm Hash digest
SHA256 953836b6fd1ace978e0ceda41565b5e77a9383a9da6d71afbeaa75d89f9ef6e3
MD5 d1c1fd70f9a3de8d3d45752eb008715e
BLAKE2b-256 0092c5c1a983d93c66ffd60abc94c8b1d1e0d60d407a29c1814026ae4559fa53

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cc_dump-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa139274cefdcea420b28f0cf5367d4a8ec859c8f90b2da3ec61e20507e0ab39
MD5 22115ecf7b5c6968fa39191821b640bc
BLAKE2b-256 01ff755d89733e25a52054023162c3835aed955ad88ce23f49e8caced3864f13

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