How liaohch3/claude-tap works
claude-tap captures AI coding-agent API traffic or local transcripts, stores trace sessions locally, and presents them for inspection and export. The main workflow is to launch or watch a client, proxy or ingest its activity, persist records, and review them in the dashboard or a portable HTML viewer. The README documents broad client support, request diffs, prompt capture, usage inspection, and privacy protections. Some subsystems are represented from README claims and the source index; edges are limited to documented or indexed relationships.
Main entry points: cli.py CLI orchestration · proxy.py API proxy · forward_proxy.py Forward proxy · trace.py Trace writer
Components 23
Client entry
- CLI orchestration
claude_tap/cli.py - Client launchers
claude_tap/cli_clients.py
Traffic capture
- Transcript watcher
claude_tap/cursor_transcript.py - API proxy
claude_tap/proxy.py - Forward proxy
claude_tap/forward_proxy.py - WebSocket proxy
claude_tap/ws_proxy.py - Upstream routing
claude_tap/upstream.py - Bedrock support
claude_tap/bedrock.py - Stream reconstruction
claude_tap/sse.py - Prompt snapshots
claude_tap/prompt_snapshot.py
Trace records
- Trace writer
claude_tap/trace.py - SQLite trace store
claude_tap/trace_store.py - Trace log handler
claude_tap/trace_log_handler.py - Usage normalization
claude_tap/usage.py
Trace review
- Dashboard summaries
claude_tap/dashboard.py - Live updates
claude_tap/live.py - Shared dashboard
claude_tap/shared_dashboard.py - Trace viewer
claude_tap/viewer.py - HTML export
claude_tap/export.py - Compact trace format
claude_tap/compact_trace.py
Other components
- Engineer
- AI coding agent
- Model API
Connections 37
- Engineer → CLI orchestration: runs
README.md - CLI orchestration → Client launchers: launches
claude_tap/cli.py - Client launchers → AI coding agent: starts
README.md - AI coding agent → API proxy: sends API traffic
README.md - CLI orchestration → API proxy: configures
claude_tap/cli.py - CLI orchestration → Forward proxy: configures
claude_tap/cli.py - Forward proxy → Model API: forwards requests
README.md - API proxy → Model API: forwards requests
README.md - API proxy → WebSocket proxy: dispatches
claude_tap/proxy.py - API proxy → Upstream routing: uses routing
claude_tap/proxy.py - Forward proxy → Upstream routing: uses routing
claude_tap/forward_proxy.py - Forward proxy → Bedrock support: handles Bedrock
claude_tap/forward_proxy.py - API proxy → Bedrock support: handles Bedrock
claude_tap/proxy.py - Forward proxy → Stream reconstruction: reconstructs streams
claude_tap/forward_proxy.py - API proxy → Stream reconstruction: reconstructs streams
claude_tap/proxy.py - Forward proxy → Usage normalization: normalizes usage
claude_tap/forward_proxy.py - API proxy → Usage normalization: normalizes usage
claude_tap/proxy.py - Transcript watcher → Trace writer: records transcripts
claude_tap/cursor_transcript.py - API proxy → Trace writer: records traffic
claude_tap/proxy.py - Forward proxy → Trace writer: records traffic
claude_tap/forward_proxy.py - Trace writer → SQLite trace store: appends records
claude_tap/trace.py - Trace writer → Usage normalization: normalizes usage
claude_tap/trace.py - Trace log handler → SQLite trace store: appends logs
claude_tap/trace_log_handler.py - CLI orchestration → Trace log handler: configures
claude_tap/cli.py - CLI orchestration → Prompt snapshots: captures prompts
claude_tap/cli.py - CLI orchestration → Live updates: starts live updates
claude_tap/cli.py - Dashboard summaries → SQLite trace store: reads sessions
claude_tap/dashboard.py - Dashboard summaries → Usage normalization: summarizes tokens
claude_tap/dashboard.py - Dashboard summaries → Trace viewer: uses viewer
claude_tap/dashboard.py - Shared dashboard → SQLite trace store: reads sessions
claude_tap/shared_dashboard.py - CLI orchestration → Shared dashboard: starts dashboard
claude_tap/cli.py - CLI orchestration → Dashboard summaries: prepares dashboard
claude_tap/cli.py - HTML export → SQLite trace store: loads traces
claude_tap/export.py - HTML export → Prompt snapshots: includes snapshots
claude_tap/export.py - HTML export → Compact trace format: encodes traces
claude_tap/export.py - HTML export → Trace viewer: generates HTML
claude_tap/export.py - Trace viewer → Usage normalization: renders usage
claude_tap/viewer.py