[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82448":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":46,"readmeContent":47,"aiSummary":48,"trendingCount":15,"starSnapshotCount":15,"syncStatus":49,"lastSyncTime":50,"discoverSource":51},82448,"claude-tap","liaohch3\u002Fclaude-tap","liaohch3","Intercept and inspect Coding Agent API traffic from Claude Code, Codex CLI, Gemini CLI, Cursor CLI, OpenCode, Kimi, Pi, and Hermes in a local trace viewer.",null,"Python",1629,175,3,12,0,165,590,611,495,19.74,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"agent-debugging","agent-observability","ai-agents","ai-tools","api-debugging","claude-code","codex","codex-cli","cursor-cli","developer-tools","gemini-cli","hermes-agent","kimi","llm","llm-proxy","opencode","pi-coding-agent","proxy","trace","trace-viewer","2026-06-12 02:04:26","# claude-tap\n\n[![PyPI version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fclaude-tap.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fclaude-tap\u002F)\n[![PyPI downloads](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fclaude-tap.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fclaude-tap\u002F)\n[![Python version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fclaude-tap.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fclaude-tap\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fliaohch3\u002Fclaude-tap.svg)](https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fblob\u002Fmain\u002FLICENSE)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fliaohch3\u002Fclaude-tap?style=social)](https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fstargazers)\n[![All Contributors](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fall_contributors-9-orange.svg)](#contributors)\n\n[中文文档](README_zh.md)\n\n`claude-tap` is a local proxy and trace viewer for AI coding agents. Run your CLI through it, then inspect the real API traffic: system prompts, conversation history, tool schemas, tool calls, streaming responses, token usage, and request diffs.\n\nIt works with [Claude Code](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fclaude-code), [Codex CLI](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex), [Gemini CLI](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli), [Kimi CLI](https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fkimi-cli), [OpenCode](https:\u002F\u002Fopencode.ai), [Pi](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono\u002Ftree\u002Fmain\u002Fpackages\u002Fcoding-agent), [Hermes Agent](https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent), [Cursor CLI](https:\u002F\u002Fcursor.com\u002Fcli), [Qoder CLI](https:\u002F\u002Fqoder.com\u002Fcli), [Antigravity CLI](https:\u002F\u002Fantigravity.google\u002Fproduct\u002Fantigravity-cli), and [CodeBuddy CLI](https:\u002F\u002Fwww.codebuddy.ai).\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fdemo.gif\" alt=\"claude-tap demo showing a real Codex trace\" width=\"100%\">\n  \u003Cbr>\n  \u003Csub>Open a real agent run, inspect every request, and compare how context changes between turns.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd width=\"33%\" align=\"center\">\n      \u003Cimg src=\"docs\u002Fviewer-light.png\" alt=\"Light mode trace viewer\" width=\"100%\">\n      \u003Cbr>\n      \u003Csub>Light viewer overview\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"33%\" align=\"center\">\n      \u003Cimg src=\"docs\u002Fviewer-dark.png\" alt=\"Dark mode trace viewer\" width=\"100%\">\n      \u003Cbr>\n      \u003Csub>Dark mode for long review sessions\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"33%\" align=\"center\">\n      \u003Cimg src=\"docs\u002Fdiff-modal.png\" alt=\"Structured diff modal\" width=\"100%\">\n      \u003Cbr>\n      \u003Csub>Structured diff across adjacent requests\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## Why use it\n\n- 👀 **See the exact context**: inspect prompts, messages, tool definitions, tool calls, tool results, reconstructed streaming responses, and token usage.\n- 🔎 **Debug behavior with evidence**: compare adjacent requests and pinpoint which prompt, message, tool, or parameter changed.\n- 📦 **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.\n- 🔒 **Keep traces on your machine**: no hosted dashboard is required, and common auth headers are redacted before recording.\n- 🧩 **Use one workflow across clients**: trace Claude Code, Codex CLI, Gemini CLI, Kimi CLI, OpenCode, Pi, Hermes Agent, Cursor CLI, Qoder CLI, and CodeBuddy.\n\n## Supported Clients\n\n| Client | Typical use |\n|--------|-------------|\n| [Claude Code](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fclaude-code) | Anthropic API or Claude-compatible gateways such as DeepSeek \u002F GLM |\n| [Codex CLI](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex) | OpenAI API key mode or ChatGPT subscription OAuth |\n| [Gemini CLI](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli) | Google OAuth \u002F Code Assist traffic |\n| [Kimi CLI](https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fkimi-cli) | Kimi Code or Moonshot Open Platform |\n| [OpenCode](https:\u002F\u002Fopencode.ai) | Multi-provider OpenCode sessions |\n| [Pi](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono\u002Ftree\u002Fmain\u002Fpackages\u002Fcoding-agent) | Pi sessions, including OpenAI Codex OAuth providers |\n| [Hermes Agent](https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent) | Multi-provider Hermes TUI or gateway sessions |\n| [Cursor CLI](https:\u002F\u002Fcursor.com\u002Fcli) | Cursor Agent sessions plus readable local transcript import |\n| [Qoder CLI](https:\u002F\u002Fqoder.com\u002Fcli) | Qoder Agent sessions through forward proxy mode |\n| [Antigravity CLI](https:\u002F\u002Fantigravity.google\u002Fproduct\u002Fantigravity-cli) | Antigravity Agent sessions through forward proxy mode |\n| [CodeBuddy CLI](https:\u002F\u002Fwww.codebuddy.ai) | Tencent CodeBuddy SaaS or internal Copilot endpoint |\n\n## Install\n\nRequires Python 3.11+ and the client you want to trace.\n\n```bash\n# Recommended\nuv tool install claude-tap\n\n# Or with pip\npip install claude-tap\n```\n\nUpgrade: `claude-tap update`, `uv tool upgrade claude-tap`, or `pip install --upgrade claude-tap`\n\n## Quick Start\n\nRun the client you want to inspect through `claude-tap`. Flags after `--` are passed to the selected client.\n\n```bash\n# Claude Code with the live browser viewer enabled by default\nclaude-tap\n\n# Restore pre-v0.1.75 behavior: no live viewer server\nclaude-tap --tap-no-live\n\n# Codex CLI\nclaude-tap --tap-client codex\n\n# Gemini CLI\nclaude-tap --tap-client gemini -- -p \"hello\"\n\n# Kimi CLI\nclaude-tap --tap-client kimi\n\n# Pi\nclaude-tap --tap-client pi -- --model openai-codex\u002Fgpt-5.3-codex-spark -p \"hello\"\n\n# Cursor CLI\nclaude-tap --tap-client cursor -- -p --trust --model auto \"hello\"\n\n# Qoder CLI\nclaude-tap --tap-client qoder -- -p \"hello\" --permission-mode dont_ask\n\n# Antigravity CLI\nclaude-tap --tap-client agy\n\n# CodeBuddy CLI\nclaude-tap --tap-client codebuddy\n```\n\n\u003Cdetails>\n\u003Csummary>Claude Code examples\u003C\u002Fsummary>\n\n```bash\n# Pass flags through to Claude Code\nclaude-tap -- --model claude-opus-4-6\nclaude-tap -c    # continue last conversation\n\n# Skip all permission prompts (auto-accept tool calls)\nclaude-tap -- --dangerously-skip-permissions\n\n# Live viewer is on by default; pass Claude flags after --\nclaude-tap -- --dangerously-skip-permissions --model claude-sonnet-4-6\n```\n\n`claude-tap` auto-detects custom Claude Code upstreams from `ANTHROPIC_BASE_URL`\nin your environment or Claude settings. Use `--tap-target` only when you want to\noverride that detected target.\n\nFor the Claude Code VS Code extension, set `Claude Code: Claude Process Wrapper` to `claude-tap`; on Windows, use the full `claude-tap.exe` path if VS Code cannot find it.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Claude Code with DeepSeek API\u003C\u002Fsummary>\n\nFull English guide: [Claude Code with DeepSeek API](docs\u002Fguides\u002Fdeepseek-claude-code.md). Simplified Chinese version: [Claude Code 搭配 DeepSeek API](docs\u002Fguides\u002Fdeepseek-claude-code.zh.md).\n\n```bash\nexport ANTHROPIC_AUTH_TOKEN=\"\u003Cyour DeepSeek API key>\"\nunset ANTHROPIC_API_KEY\n\nexport ANTHROPIC_MODEL=\"deepseek-v4-pro[1m]\"\nexport ANTHROPIC_DEFAULT_OPUS_MODEL=\"deepseek-v4-pro[1m]\"\nexport ANTHROPIC_DEFAULT_SONNET_MODEL=\"deepseek-v4-pro[1m]\"\nexport ANTHROPIC_DEFAULT_HAIKU_MODEL=\"deepseek-v4-flash\"\nexport CLAUDE_CODE_SUBAGENT_MODEL=\"deepseek-v4-flash\"\nexport CLAUDE_CODE_EFFORT_LEVEL=max\nexport ANTHROPIC_BASE_URL=https:\u002F\u002Fapi.deepseek.com\u002Fanthropic\n```\n\n```bash\nclaude-tap -- --permission-mode bypassPermissions\n```\n\n`claude-tap` reads the DeepSeek upstream from `ANTHROPIC_BASE_URL`, then launches Claude Code against the local proxy. Use `--tap-target https:\u002F\u002Fapi.deepseek.com\u002Fanthropic` only as a manual override.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Codex CLI auth modes and examples\u003C\u002Fsummary>\n\nCodex CLI supports two authentication modes with different upstream targets:\n\n| Auth Mode | How to authenticate | Upstream target | Notes |\n|-----------|-------------------|-----------------|-------|\n| **OAuth** (ChatGPT subscription) | `codex login` | `https:\u002F\u002Fchatgpt.com\u002Fbackend-api\u002Fcodex` | Default for ChatGPT Plus\u002FPro\u002FTeam users |\n| **API Key** | Set `OPENAI_API_KEY` | `https:\u002F\u002Fapi.openai.com` (default) | Pay-per-use via OpenAI Platform |\n\n`claude-tap` auto-detects the Codex target from your auth state when possible.\n\n```bash\n# OAuth users (ChatGPT Plus\u002FPro\u002FTeam) — auto-detected after `codex login`\nclaude-tap --tap-client codex\n\n# If auto-detection cannot read your Codex auth file, specify the target explicitly\nclaude-tap --tap-client codex --tap-target https:\u002F\u002Fchatgpt.com\u002Fbackend-api\u002Fcodex\n\n# API Key users — default OpenAI API target works out of the box\nclaude-tap --tap-client codex\n\n# With specific model\nclaude-tap --tap-client codex -- --model codex-mini-latest\n\n# Full auto-approval (skip all permission prompts)\nclaude-tap --tap-client codex -- --full-auto\n\n# OAuth + full auto; live viewer is enabled by default\nclaude-tap --tap-client codex -- --full-auto\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Kimi CLI examples\u003C\u002Fsummary>\n\nKimi CLI uses reverse proxy mode by default through `KIMI_BASE_URL`. Use your existing Kimi CLI auth\u002Fconfig; the default upstream target is the Kimi Code API.\n\n```bash\nclaude-tap --tap-client kimi\nclaude-tap --tap-client kimi -- --thinking\n\n# Use Moonshot Open Platform instead of Kimi Code\nclaude-tap --tap-client kimi --tap-target https:\u002F\u002Fapi.moonshot.ai\u002Fv1\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Gemini CLI examples\u003C\u002Fsummary>\n\nGemini CLI uses forward proxy mode by default. Google OAuth \u002F Code Assist traffic goes to several Google endpoints, so forward proxy capture is the safest default. Reverse mode remains available for API-key or Vertex-style flows that honor `GOOGLE_GEMINI_BASE_URL` or `GOOGLE_VERTEX_BASE_URL`.\n\n```bash\n# Google OAuth \u002F Code Assist\nclaude-tap --tap-client gemini -- -p \"hello\"\n\n# Live viewer is enabled by default\nclaude-tap --tap-client gemini -- -p \"hello\"\n\n# Reverse mode for compatible API-key \u002F Vertex flows\nclaude-tap --tap-client gemini --tap-proxy-mode reverse -- -p \"hello\"\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>OpenCode examples\u003C\u002Fsummary>\n\n[OpenCode](https:\u002F\u002Fopencode.ai) is a multi-provider terminal AI assistant. Because it can talk to many providers, claude-tap defaults to **forward proxy** mode for opencode: it injects `HTTPS_PROXY` plus the local CA into the child process so traffic to any provider is captured.\n\n```bash\n# Forward proxy mode — captures every provider opencode talks to (default)\nclaude-tap --tap-client opencode\n\n# Live viewer is enabled by default\nclaude-tap --tap-client opencode\n\n# Reverse mode — only works when using Anthropic provider (single ANTHROPIC_BASE_URL)\nclaude-tap --tap-client opencode --tap-proxy-mode reverse\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Pi examples\u003C\u002Fsummary>\n\n[Pi](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono\u002Ftree\u002Fmain\u002Fpackages\u002Fcoding-agent) is a multi-provider coding agent. claude-tap defaults to **forward proxy** mode for Pi because Pi can use subscription OAuth providers such as `openai-codex` and custom API-key providers from its model registry.\n\n```bash\n# OpenAI Codex OAuth via Pi's openai-codex provider\nclaude-tap --tap-client pi -- --model openai-codex\u002Fgpt-5.3-codex-spark -p \"hello\"\n\n# Live viewer is enabled by default\nclaude-tap --tap-client pi -- --model openai-codex\u002Fgpt-5.3-codex-spark -p \"hello\"\n\n# Read-only tool capture\nclaude-tap --tap-client pi -- --model openai-codex\u002Fgpt-5.3-codex-spark --tools bash -p \"Run pwd\"\n```\n\nPi stores OAuth credentials in `~\u002F.pi\u002Fagent\u002Fauth.json` after `\u002Flogin`. If you keep Pi credentials in another directory, set `PI_CODING_AGENT_DIR` before launching `claude-tap`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Hermes Agent examples\u003C\u002Fsummary>\n\nHermes Agent is a multi-provider Python AI agent (Nous Portal, OpenRouter, NVIDIA NIM, Xiaomi MiMo, GLM, Kimi, MiniMax, Hugging Face, OpenAI, Anthropic, custom). Because it can talk to any of these providers — and `httpx` \u002F `requests` both honor `HTTPS_PROXY` natively — claude-tap defaults to **forward proxy** mode for hermes: it injects `HTTPS_PROXY` plus the local CA into the child process so any provider is captured.\n\n```bash\n# Interactive TUI — the recommended way for local trace capture.\nclaude-tap --tap-client hermes\n\n# Gateway mode — captures LLM calls triggered by incoming platform messages (Slack, Telegram, etc.).\n# Requires a messaging platform configured in ~\u002F.hermes\u002F.env.\n# claude-tap auto-rewrites `gateway start` → `gateway run` so the gateway runs in the\n# foreground and inherits HTTPS_PROXY; without this, the daemon spawned by systemd\u002Flaunchd\n# would not go through the proxy and no traces would be recorded.\nclaude-tap --tap-client hermes -- gateway start\n\n# Reverse mode is opt-in and only useful when ~\u002F.hermes is configured with an\n# OpenAI-compatible provider that reads OPENAI_BASE_URL.\nclaude-tap --tap-client hermes --tap-proxy-mode reverse\n```\n\n> **Note:** Gateway mode only produces traces when a configured messaging platform (Slack, Telegram, etc.) delivers a message to the bot. Without an active platform integration, the gateway makes no LLM calls and no traces are recorded.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Cursor CLI examples\u003C\u002Fsummary>\n\nCursor CLI uses forward proxy mode by default. Use `--model auto` on free plans, and omit `--mode ask` when you want tool calls.\n\n```bash\nclaude-tap --tap-client cursor -- -p --trust --model auto \"hello\"\nclaude-tap --tap-client cursor -- -p --trust --model auto --continue \"continue\"\n```\n\n\u003C\u002Fdetails>\n\n## Guides and Integrations\n\n- [OpenClaw setup guide](docs\u002Fguides\u002FOPENCLAW_README.md) for integrating `claude-tap` with OpenClaw. Simplified Chinese version: [OpenClaw 设置指南](docs\u002Fguides\u002FOPENCLAW_README.zh.md).\n- [Claude Code with DeepSeek API](docs\u002Fguides\u002Fdeepseek-claude-code.md) for routing Claude Code through DeepSeek's Anthropic-compatible API. Simplified Chinese version: [Claude Code 搭配 DeepSeek API](docs\u002Fguides\u002Fdeepseek-claude-code.zh.md).\n- [Client support matrix](docs\u002Fsupport-matrix.md) for exact environment variables, proxy modes, and URL rewrite rules.\n\n\u003Cdetails>\n\u003Csummary>Qoder CLI examples\u003C\u002Fsummary>\n\nQoder CLI talks to multiple Qoder endpoints, so claude-tap defaults to **forward proxy** mode for `--tap-client qoder`.\n\n```bash\n# Browser login, PAT, or job token must be configured before launch.\nqodercli login\n\nclaude-tap --tap-client qoder -- -p \"hello\" --permission-mode dont_ask\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Antigravity CLI examples\u003C\u002Fsummary>\n\nAntigravity CLI talks to multiple Google\u002FAntigravity endpoints, so claude-tap defaults to **forward proxy** mode for `--tap-client agy`. Its Code Assist model API also honors `CLOUD_CODE_URL`; claude-tap injects that automatically so model requests such as `\u002Fv1internal:streamGenerateContent` are captured by the same local proxy.\n\nOn macOS, Antigravity may not honor per-process CA environment variables. claude-tap automatically trusts the local CA in your current user's login keychain on first `agy` launch. This does not use `sudo` or the System keychain, though macOS may prompt to unlock the login keychain.\n\n```bash\nclaude-tap --tap-client agy --tap-live\n\n# Optional: trust the CA separately before launching a forward-proxy client.\nclaude-tap trust-ca\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>CodeBuddy CLI examples\u003C\u002Fsummary>\n\nCodeBuddy uses reverse proxy mode by default. claude-tap auto-detects the upstream from CodeBuddy's own login cache (`~\u002F.codebuddy\u002Flocal_storage\u002F`), so iOA \u002F WeChat \u002F Google-Github \u002F Enterprise-Domain login modes all work without any extra flag. When the cache is missing (e.g. before first login), it falls back to `https:\u002F\u002Fcopilot.tencent.com\u002Fv2`.\n\n```bash\n# Auto-detected endpoint (works for all four login modes once logged in)\nclaude-tap --tap-client codebuddy\n\n# Explicit override (e.g. external SaaS or staging)\nclaude-tap --tap-client codebuddy --tap-target https:\u002F\u002Fwww.codebuddy.ai\u002Fv2\n\n# Or via environment variable\nCODEBUDDY_BASE_URL=https:\u002F\u002Fwww.codebuddy.ai\u002Fv2 claude-tap --tap-client codebuddy -- -p \"Reply OK\"\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Viewer, export, and advanced options\u003C\u002Fsummary>\n\n```bash\n# Live viewer runs by default while a client runs\nclaude-tap\n\n# Disable live viewer for scripts, CI, remote shells, or old behavior\nclaude-tap --tap-no-live\n\n# Browse saved traces without launching a client\nclaude-tap dashboard\n\n# Regenerate a self-contained HTML viewer from JSONL\nclaude-tap export .traces\u002F2026-02-28\u002Ftrace_141557.jsonl -o trace.html\n\n# Export a portable compact trace bundle, then render it later\nclaude-tap export \u003Csession-id> --format compact -o trace.ctap.json\nclaude-tap export trace.ctap.json -o trace.html\n\n# Embed the exported viewer in an iframe with reduced chrome\n# trace.html?embed=1&hideHeader=1&hidePath=1&hideHistory=1&hideControls=1&density=compact&theme=light\n\n# Store traces in another directory, or keep fewer sessions\nclaude-tap --tap-output-dir .\u002Fmy-traces\nclaude-tap --tap-max-traces 10\n\n# Start only the proxy for custom setups\nclaude-tap --tap-no-launch --tap-port 8080\n\n# Disable browser auto-open for live and generated viewers\nclaude-tap --tap-no-open\n```\n\nIn proxy-only mode, start your client in another terminal and point its base URL or proxy settings at the local proxy. Use the [client support matrix](docs\u002Fsupport-matrix.md) for exact wiring.\n\nWhen used as VSCode Claude Code's `claudeProcessWrapper`, claude-tap honors the Claude binary path passed by the extension.\n\n### CLI Options\n\nAll flags are forwarded to the selected client, except these `--tap-*` ones:\n\n```\n--tap-client CLIENT      Client to launch: claude (default), agy, codex, gemini, kimi, opencode, pi, hermes, cursor, qoder, or codebuddy\n--tap-target URL         Upstream API URL (default: auto per client)\n--tap-live               Start real-time viewer while the client runs (default: on)\n--tap-no-live            Disable the real-time viewer server (pre-v0.1.75 behavior)\n--tap-live-port PORT     Port for live viewer server (default: auto)\n--tap-no-open            Don't auto-open live or generated HTML viewers in a browser\n--tap-output-dir DIR     Trace output directory (default: .\u002F.traces)\n--tap-port PORT          Proxy port (default: auto)\n--tap-host HOST          Bind address (default: 127.0.0.1, or 0.0.0.0 in --tap-no-launch mode)\n--tap-no-launch          Only start the proxy, don't launch client\n--tap-max-traces N       Max trace sessions to keep (default: 50, 0 = unlimited)\n--tap-store-stream-events Persist raw SSE\u002FWebSocket event arrays during capture so viewer\u002Fexport output can show them (default: off)\n--tap-no-update-check    Disable PyPI update check on startup\n--tap-no-auto-update     Check for updates but don't auto-download\n--tap-proxy-mode MODE    Proxy mode: reverse or forward (default: reverse for claude\u002Fcodex\u002Fkimi\u002Fcodebuddy, forward for agy\u002Fgemini\u002Fopencode\u002Fpi\u002Fhermes\u002Fcursor\u002Fqoder)\n--tap-trust-ca           On macOS, explicitly trust the local CA in the user login keychain before launch (agy does this automatically)\n```\n\n\u003C\u002Fdetails>\n\n## Viewer Features\n\n### Trace viewer capabilities\n\nThe viewer is a single self-contained HTML file (zero external dependencies):\n\n- **Structural diff** — compare consecutive requests to see exactly what changed: new\u002Fremoved messages, system prompt diffs, character-level inline highlighting\n- **Path filtering** — filter by API endpoint (e.g., `\u002Fv1\u002Fmessages` only)\n- **Model grouping** — sidebar groups requests by model, with Claude-family priority ordering\n- **Token usage breakdown** — input \u002F output \u002F cache read \u002F cache creation\n- **Tool inspector** — expandable cards with tool name, description, and parameter schema\n- **Search** — full-text search across messages, tools, prompts, and responses\n- **Dark mode** — toggle light\u002Fdark themes (respects system preference)\n- **Iframe embed mode** — add query parameters such as `embed=1`, `hideHeader=1`, `hidePath=1`, `hideHistory=1`, `hideControls=1`, `density=compact`, and `theme=light|dark`\n- **Keyboard navigation** — `j`\u002F`k` or arrow keys\n- **Copy helpers** — one-click copy of request JSON or cURL command\n- **i18n** — English, 简体中文, 日本語, 한국어, Français, العربية, Deutsch, Русский\n\n## Architecture\n\n![Architecture](docs\u002Farchitecture.png)\n\n\u003Cdetails>\n\u003Csummary>How it works\u003C\u002Fsummary>\n\n**How it works:**\n\n1. `claude-tap` starts a reverse or forward proxy and spawns the selected client\n2. Base URL clients are pointed at the reverse proxy; clients without base URL support use proxy\u002FCA environment variables\n3. SSE and WebSocket streams are forwarded as chunks\u002Fmessages arrive with low proxy overhead\n4. Each request-response pair or WebSocket session is recorded to local trace storage; raw SSE\u002FWebSocket event arrays are omitted by default and must be captured with `--tap-store-stream-events` if you need them later in viewer\u002Fexport output\n5. On exit, a self-contained HTML viewer is generated\n6. Live mode is enabled by default and broadcasts updates to the browser via SSE\n\n**Key features:** 🔒 Common auth headers auto-redacted · ⚡ Low-overhead streaming · 📦 Self-contained viewer · 🔄 Real-time live mode\n\n\u003C\u002Fdetails>\n\n## Community\n\n### Star History\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?repos=liaohch3%2Fclaude-tap&type=date&legend=bottom-right\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=liaohch3\u002Fclaude-tap&type=date&theme=dark&legend=top-left\" \u002F>\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=liaohch3\u002Fclaude-tap&type=date&legend=top-left\" \u002F>\n    \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=liaohch3\u002Fclaude-tap&type=date&legend=top-left\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n### Contributors\n\nThanks goes to these contributors:\n\n\u003C!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n\u003C!-- prettier-ignore-start -->\n\u003C!-- markdownlint-disable -->\n\u003Ctable>\n  \u003Ctbody>\n    \u003Ctr>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34056481?s=100\" width=\"100px;\" alt=\"liaohch3\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>liaohch3\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=liaohch3\" title=\"Code\">💻\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=liaohch3\" title=\"Documentation\">📖\u003C\u002Fa> \u003Ca href=\"#maintenance-liaohch3\" title=\"Maintenance\">🚧\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=liaohch3\" title=\"Tests\">⚠️\u003C\u002Fa>\u003C\u002Ftd>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FWEIFENG2333\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F61730227?s=100\" width=\"100px;\" alt=\"BKK\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>BKK\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=WEIFENG2333\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FYoungCan-Wang\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F73347006?s=100\" width=\"100px;\" alt=\"YoungCan-Wang\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>YoungCan-Wang\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=YoungCan-Wang\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Foxkrypton\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F154910746?s=100\" width=\"100px;\" alt=\"0xkrypton\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>0xkrypton\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=oxkrypton\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fgoogs1025\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F86391540?s=100\" width=\"100px;\" alt=\"CYJiang\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>CYJiang\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=googs1025\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FTITOCHAN2023\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F138754853?s=100\" width=\"100px;\" alt=\"陈展鹏\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>陈展鹏\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=TITOCHAN2023\" title=\"Documentation\">📖\u003C\u002Fa>\u003C\u002Ftd>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fdevtalker\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F23204195?s=100\" width=\"100px;\" alt=\"devtalker\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>devtalker\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=devtalker\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fdingyaguang117\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1930778?s=100\" width=\"100px;\" alt=\"Yaguang Ding\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Yaguang Ding\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=dingyaguang117\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n      \u003Ctd align=\"center\" valign=\"top\" width=\"14.28%\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsephymartin\">\u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F299891?s=100\" width=\"100px;\" alt=\"Sephy\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Sephy\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fliaohch3\u002Fclaude-tap\u002Fcommits?author=sephymartin\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\n\u003C!-- markdownlint-restore -->\n\u003C!-- prettier-ignore-end -->\n\n\u003C!-- ALL-CONTRIBUTORS-LIST:END -->\n\n## Contributing\n\nContributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT\n","claude-tap 是一个用于拦截和检查 AI 编码代理 API 流量的本地代理和跟踪查看器。它支持多种编码代理工具，如 Claude Code、Codex CLI、Gemini CLI 等，能够展示系统提示、对话历史、工具模式、工具调用、流式响应、令牌使用情况等详细信息。项目采用 Python 语言编写，具备强大的调试功能，允许用户在本地环境中直观地查看和比较 API 请求之间的差异，从而更好地理解和调试 AI 代理的行为。适用于需要对 AI 编码助手进行深入分析和故障排除的开发场景。",2,"2026-06-11 04:08:43","high_star"]