claude-tap
Intercept and inspect Coding Agent API traffic from Claude Code, Codex CLI, Gemini CLI, Cursor CLI, OpenCode, Kimi/Kimi Code, Pi, and Hermes in a local trace vi
What is claude-tap?
Intercept and inspect Coding Agent API traffic from Claude Code, Codex CLI, Gemini CLI, Cursor CLI, OpenCode, Kimi/Kimi Code, Pi, and Hermes in a local trace viewer.
Overview of claude-tap
What it is
claude-tap is a local proxy and trace viewer for AI coding agents. It runs your CLI through it or listens to local app transcripts, then inspects the real API traffic and agent context: system prompts, conversation history, tool schemas, tool calls, streaming responses, token usage, and request diffs. It supports multiple clients including Claude Code, Codex CLI, Codex App, Gemini CLI, Grok Build CLI, Kimi CLI, MiMo Code, OpenCode, OpenClaw, Pi, Hermes Agent, Cursor CLI, Qoder CLI, Antigravity CLI, and CodeBuddy CLI.
Key features
- Inspect exact context: view prompts, messages, tool definitions, tool calls, tool results, reconstructed streaming responses, and token usage.
- Debug behavior with evidence: compare adjacent requests and pinpoint which prompt, message, tool, or parameter changed.
- Share one portable artifact: each run writes a local trace session that can be exported to a self-contained HTML viewer for review or archiving.
- Keep traces on your machine: no hosted dashboard is required, and common auth headers are redacted before recording.
- Use one workflow across clients: trace Claude Code, Codex CLI, Gemini CLI, and many others with the same tool.
Use cases
- Debugging agent behavior by examining the exact context and request diffs.
- Reviewing how context changes between turns by comparing adjacent requests.
- Sharing trace sessions as portable HTML files for collaboration or archiving.
- Keeping all trace data local for privacy, with no upload to external dashboards.
Getting started
Requires Python 3.11+. Install with: bash uv tool install claude-tap # Or with pip pip install claude-tap Quick start: run claude-tap to launch Claude Code with the live browser viewer enabled. For other clients, use the --tap-client flag, e.g., claude-tap --tap-client codex. See the repository README for detailed usage.
License and pricing
License: MIT. Pricing: open source.
Based on the project's public README and repository metadata.