CLI ToolsMay 13, 2026·2 min read

claude-tap — Trace Claude/Cursor CLI API Calls

claude-tap captures API traffic from Claude Code, Codex CLI, Cursor CLI, etc., and renders prompts and tool calls in a trace viewer. Verified 321★.

Intro

claude-tap captures API traffic from Claude Code, Codex CLI, Cursor CLI, etc., and renders prompts and tool calls in a trace viewer. Verified 321★.

Best for: Teams debugging agent behavior (prompts/tools/history) across multiple coding CLIs

Works with: Claude Code, Codex CLI, Cursor CLI, Gemini CLI, OpenCode; Python 3.11+ (uv/pip install)

Setup time: 6-12 minutes

Key facts (verified)

  • GitHub: 321 stars · 46 forks · pushed 2026-05-13.
  • License: MIT · owner avatar + repo URL verified via GitHub API.
  • README-verified entrypoint: uv tool install claude-tap && claude-tap --tap-live.

Main

  • Use it as a cross-client debugger: README lists multiple supported coding CLIs and shows how to switch via --tap-client.

  • Turn on live mode when you need to inspect traces while the agent is running (--tap-live in README).

  • Capture first, optimize later: use traces to identify prompt bloat, tool misuse, and token spikes before changing your agent policies.

Source-backed notes

  • README says it intercepts API traffic from Claude Code, Codex CLI, Gemini CLI, OpenCode, and Cursor CLI and visualizes traces.
  • README recommends install via uv tool install claude-tap and also supports pip install.
  • README documents usage examples like claude-tap --tap-client codex and forwarding args after --.

FAQ

  • Do I need to modify my CLI tools?: No — README shows running clients through claude-tap without patching them.
  • Can I trace Codex CLI OAuth mode?: Yes — README notes Codex auth modes and shows examples; you may set a target explicitly if needed.
  • What Python version is required?: README lists Python 3.11+ for installation and usage.
🙏

Source & Thanks

Source: https://github.com/liaohch3/claude-tap > License: MIT > GitHub stars: 321 · forks: 46

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets