{"id":49624833,"url":"https://github.com/liaohch3/claude-tap","last_synced_at":"2026-05-26T11:00:28.405Z","repository":{"id":338617528,"uuid":"1158479469","full_name":"liaohch3/claude-tap","owner":"liaohch3","description":"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.","archived":false,"fork":false,"pushed_at":"2026-05-24T11:08:54.000Z","size":77071,"stargazers_count":786,"open_issues_count":16,"forks_count":94,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-24T11:09:05.869Z","etag":null,"topics":["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"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liaohch3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"docs/support-matrix.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-15T12:51:26.000Z","updated_at":"2026-05-24T09:31:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/liaohch3/claude-tap","commit_stats":null,"previous_names":["liaohch3/claude-tap"],"tags_count":75,"template":false,"template_full_name":null,"purl":"pkg:github/liaohch3/claude-tap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaohch3%2Fclaude-tap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaohch3%2Fclaude-tap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaohch3%2Fclaude-tap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaohch3%2Fclaude-tap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liaohch3","download_url":"https://codeload.github.com/liaohch3/claude-tap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liaohch3%2Fclaude-tap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33517124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2026-05-05T05:04:24.466Z","updated_at":"2026-05-26T11:00:28.394Z","avatar_url":"https://github.com/liaohch3.png","language":"Python","funding_links":[],"categories":["LLMOps","CLIs","Deployment and Operations","*Ops for AI"],"sub_categories":["LLM Observability \u0026 Tracing","Usage","Skills and skill ecosystems","LLMOps"],"readme":"# claude-tap\n\n[![PyPI version](https://img.shields.io/pypi/v/claude-tap.svg)](https://pypi.org/project/claude-tap/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/claude-tap.svg)](https://pypi.org/project/claude-tap/)\n[![Python version](https://img.shields.io/pypi/pyversions/claude-tap.svg)](https://pypi.org/project/claude-tap/)\n[![License](https://img.shields.io/github/license/liaohch3/claude-tap.svg)](https://github.com/liaohch3/claude-tap/blob/main/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/liaohch3/claude-tap?style=social)](https://github.com/liaohch3/claude-tap/stargazers)\n[![All Contributors](https://img.shields.io/badge/all_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://docs.anthropic.com/en/docs/claude-code), [Codex CLI](https://github.com/openai/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Kimi CLI](https://github.com/MoonshotAI/kimi-cli), [OpenCode](https://opencode.ai), [Pi](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent), [Hermes Agent](https://github.com/NousResearch/hermes-agent), [Cursor CLI](https://cursor.com/cli), [Qoder CLI](https://qoder.com/cli), [Antigravity CLI](https://antigravity.google/product/antigravity-cli), and [CodeBuddy CLI](https://www.codebuddy.ai).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/demo.gif\" alt=\"claude-tap demo showing a real Codex trace\" width=\"100%\"\u003e\n  \u003cbr\u003e\n  \u003csub\u003eOpen a real agent run, inspect every request, and compare how context changes between turns.\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"33%\" align=\"center\"\u003e\n      \u003cimg src=\"docs/viewer-light.png\" alt=\"Light mode trace viewer\" width=\"100%\"\u003e\n      \u003cbr\u003e\n      \u003csub\u003eLight viewer overview\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"33%\" align=\"center\"\u003e\n      \u003cimg src=\"docs/viewer-dark.png\" alt=\"Dark mode trace viewer\" width=\"100%\"\u003e\n      \u003cbr\u003e\n      \u003csub\u003eDark mode for long review sessions\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"33%\" align=\"center\"\u003e\n      \u003cimg src=\"docs/diff-modal.png\" alt=\"Structured diff modal\" width=\"100%\"\u003e\n      \u003cbr\u003e\n      \u003csub\u003eStructured diff across adjacent requests\u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Why use it\n\n- 👀 **See the exact context**: inspect prompts, messages, tool definitions, tool calls, tool results, streaming chunks, 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 JSONL trace and 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://docs.anthropic.com/en/docs/claude-code) | Anthropic API or Claude-compatible gateways such as DeepSeek / GLM |\n| [Codex CLI](https://github.com/openai/codex) | OpenAI API key mode or ChatGPT subscription OAuth |\n| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Google OAuth / Code Assist traffic |\n| [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) | Kimi Code or Moonshot Open Platform |\n| [OpenCode](https://opencode.ai) | Multi-provider OpenCode sessions |\n| [Pi](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent) | Pi sessions, including OpenAI Codex OAuth providers |\n| [Hermes Agent](https://github.com/NousResearch/hermes-agent) | Multi-provider Hermes TUI or gateway sessions |\n| [Cursor CLI](https://cursor.com/cli) | Cursor Agent sessions plus readable local transcript import |\n| [Qoder CLI](https://qoder.com/cli) | Qoder Agent sessions through forward proxy mode |\n| [Antigravity CLI](https://antigravity.google/product/antigravity-cli) | Antigravity Agent sessions through forward proxy mode |\n| [CodeBuddy CLI](https://www.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/gpt-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\u003e\n\u003csummary\u003eClaude Code examples\u003c/summary\u003e\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/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClaude Code with DeepSeek API\u003c/summary\u003e\n\nFull English guide: [Claude Code with DeepSeek API](docs/guides/deepseek-claude-code.md). Simplified Chinese version: [Claude Code 搭配 DeepSeek API](docs/guides/deepseek-claude-code.zh.md).\n\n```bash\nexport ANTHROPIC_AUTH_TOKEN=\"\u003cyour DeepSeek API key\u003e\"\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://api.deepseek.com/anthropic\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://api.deepseek.com/anthropic` only as a manual override.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCodex CLI auth modes and examples\u003c/summary\u003e\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://chatgpt.com/backend-api/codex` | Default for ChatGPT Plus/Pro/Team users |\n| **API Key** | Set `OPENAI_API_KEY` | `https://api.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/Pro/Team) — 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://chatgpt.com/backend-api/codex\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/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eKimi CLI examples\u003c/summary\u003e\n\nKimi CLI uses reverse proxy mode by default through `KIMI_BASE_URL`. Use your existing Kimi CLI auth/config; 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://api.moonshot.ai/v1\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGemini CLI examples\u003c/summary\u003e\n\nGemini CLI uses forward proxy mode by default. Google OAuth / 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 / 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 / Vertex flows\nclaude-tap --tap-client gemini --tap-proxy-mode reverse -- -p \"hello\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eOpenCode examples\u003c/summary\u003e\n\n[OpenCode](https://opencode.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/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ePi examples\u003c/summary\u003e\n\n[Pi](https://github.com/badlogic/pi-mono/tree/main/packages/coding-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/gpt-5.3-codex-spark -p \"hello\"\n\n# Live viewer is enabled by default\nclaude-tap --tap-client pi -- --model openai-codex/gpt-5.3-codex-spark -p \"hello\"\n\n# Read-only tool capture\nclaude-tap --tap-client pi -- --model openai-codex/gpt-5.3-codex-spark --tools bash -p \"Run pwd\"\n```\n\nPi stores OAuth credentials in `~/.pi/agent/auth.json` after `/login`. If you keep Pi credentials in another directory, set `PI_CODING_AGENT_DIR` before launching `claude-tap`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHermes Agent examples\u003c/summary\u003e\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` / `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 ~/.hermes/.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/launchd\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 ~/.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\u003e **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/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCursor CLI examples\u003c/summary\u003e\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/details\u003e\n\n## Guides and Integrations\n\n- [OpenClaw setup guide](docs/guides/OPENCLAW_README.md) for integrating `claude-tap` with OpenClaw. Simplified Chinese version: [OpenClaw 设置指南](docs/guides/OPENCLAW_README.zh.md).\n- [Claude Code with DeepSeek API](docs/guides/deepseek-claude-code.md) for routing Claude Code through DeepSeek's Anthropic-compatible API. Simplified Chinese version: [Claude Code 搭配 DeepSeek API](docs/guides/deepseek-claude-code.zh.md).\n- [Client support matrix](docs/support-matrix.md) for exact environment variables, proxy modes, and URL rewrite rules.\n\n\u003cdetails\u003e\n\u003csummary\u003eQoder CLI examples\u003c/summary\u003e\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/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAntigravity CLI examples\u003c/summary\u003e\n\nAntigravity CLI talks to multiple Google/Antigravity 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 `/v1internal: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/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCodeBuddy CLI examples\u003c/summary\u003e\n\nCodeBuddy uses reverse proxy mode by default. claude-tap auto-detects the upstream from CodeBuddy's own login cache (`~/.codebuddy/local_storage/`), so iOA / WeChat / Google-Github / 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://copilot.tencent.com/v2`.\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://www.codebuddy.ai/v2\n\n# Or via environment variable\nCODEBUDDY_BASE_URL=https://www.codebuddy.ai/v2 claude-tap --tap-client codebuddy -- -p \"Reply OK\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eViewer, export, and advanced options\u003c/summary\u003e\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/2026-02-28/trace_141557.jsonl -o trace.html\n\n# Store traces in another directory, or keep fewer sessions\nclaude-tap --tap-output-dir ./my-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/support-matrix.md) for exact wiring.\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: ./.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-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/codex/kimi/codebuddy, forward for agy/gemini/opencode/pi/hermes/cursor/qoder)\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/details\u003e\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/removed messages, system prompt diffs, character-level inline highlighting\n- **Path filtering** — filter by API endpoint (e.g., `/v1/messages` only)\n- **Model grouping** — sidebar groups requests by model, with Claude-family priority ordering\n- **Token usage breakdown** — input / output / cache read / 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/dark themes (respects system preference)\n- **Keyboard navigation** — `j`/`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/architecture.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eHow it works\u003c/summary\u003e\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/CA environment variables\n3. SSE and WebSocket streams are forwarded as chunks/messages arrive with low proxy overhead\n4. Each request-response pair or WebSocket session is recorded to a dated `trace_*.jsonl`\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/details\u003e\n\n## Community\n\n### Star History\n\n\u003ca href=\"https://www.star-history.com/?repos=liaohch3%2Fclaude-tap\u0026type=date\u0026legend=bottom-right\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/chart?repos=liaohch3/claude-tap\u0026type=date\u0026theme=dark\u0026legend=top-left\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/chart?repos=liaohch3/claude-tap\u0026type=date\u0026legend=top-left\" /\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/chart?repos=liaohch3/claude-tap\u0026type=date\u0026legend=top-left\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n### Contributors\n\nThanks goes to these contributors:\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/liaohch3\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/34056481?s=100\" width=\"100px;\" alt=\"liaohch3\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eliaohch3\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=liaohch3\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=liaohch3\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-liaohch3\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=liaohch3\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/WEIFENG2333\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/61730227?s=100\" width=\"100px;\" alt=\"BKK\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBKK\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=WEIFENG2333\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/YoungCan-Wang\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/73347006?s=100\" width=\"100px;\" alt=\"YoungCan-Wang\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYoungCan-Wang\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=YoungCan-Wang\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/oxkrypton\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/154910746?s=100\" width=\"100px;\" alt=\"0xkrypton\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003e0xkrypton\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=oxkrypton\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/googs1025\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/86391540?s=100\" width=\"100px;\" alt=\"CYJiang\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eCYJiang\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=googs1025\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/TITOCHAN2023\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/138754853?s=100\" width=\"100px;\" alt=\"陈展鹏\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003e陈展鹏\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=TITOCHAN2023\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/devtalker\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/23204195?s=100\" width=\"100px;\" alt=\"devtalker\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003edevtalker\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=devtalker\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/dingyaguang117\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1930778?s=100\" width=\"100px;\" alt=\"Yaguang Ding\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYaguang Ding\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=dingyaguang117\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/sephymartin\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/299891?s=100\" width=\"100px;\" alt=\"Sephy\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSephy\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/liaohch3/claude-tap/commits?author=sephymartin\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## Contributing\n\nContributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliaohch3%2Fclaude-tap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliaohch3%2Fclaude-tap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliaohch3%2Fclaude-tap/lists"}