{"repo": "aeondave/pi-claude", "files": {"scripts/mitmproxy_dump.py": {"9e21dcba6d1e18d87597479723efad4c0aa58461": {"t": 1785674430.038567, "n": 2273, "h": "9502e0bca78d518d", "c": "\"\"\"\nmitmproxy addon: dump every Anthropic /v1/messages request to a JSON file.\n\nCaptures the EXACT wire request (method, URL, headers, parsed JSON body) so a\ngenuine Claude Code request can be diffed against a Pi request made through this\nplugin. The OAuth bearer token is redacted before writing.\n\nUsage (cross-platform — mitmproxy installs via `pip install mitmproxy`):\n\n # terminal 1 — start the proxy with this addon\n mitmdump -s scripts/mitmproxy_dump.py\n\n # terminal 2 — route a client through the proxy, trusting mitmproxy's CA.\n # Node CLIs (claude, pi) honor NODE_EXTRA_CA_CERTS, so no system trust needed.\n # PowerShell:\n # $env:HTTPS_PROXY=\"http://127.0.0.1:8080\"\n # $env:HTTP_PROXY=\"http://127.0.0.1:8080\"\n # $env:NODE_EXTRA_CA_CERTS=\"$HOME/.mitmproxy/mitmproxy-ca-cert.pem\"\n # $env:PI_CAPTURE_LABEL=\"claude\"; claude -p \"say hello\"\n # $env:PI_CAPTURE_LABEL=\"pi\"; pi -p \"say hello\"\n\nOutput: captures/req-