[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-78465":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":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},78465,"ccglass","jianshuo\u002Fccglass","jianshuo","See what your coding agent (Claude Code, Codex, Kimi) sends to the model — local proxy + web dashboard",null,"JavaScript",476,31,3,0,12,62,383,61,4.52,"MIT License",false,"main",true,[],"2026-06-12 02:03:47","# ccglass\n\n**See exactly what your coding agent sends to the model.** A lightweight\nlocal logging reverse-proxy + web dashboard for **Claude Code, Codex,\nOpenCode, DeepSeek-TUI, Kimi, Ollama, OpenRouter, and more**.\nOne command, like `ollama`:\n\n```bash\nnpm install -g ccglass\nccglass\n```\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fjianshuo\u002Fccglass\u002Fmain\u002Fdocs\u002Fdemo.gif\" alt=\"ccglass dashboard — live request capture, token\u002Fcache\u002Fcost, message history with tool calls, the agent-loop flow view, and a turn-to-turn diff\" width=\"100%\">\n\u003C\u002Fp>\n\nRun with no arguments and `ccglass` asks which client to inspect:\n\n```\n  Which client do you want to inspect?\n\n    1) Claude Code\n    2) Codex (OpenAI)\n    3) DeepSeek-TUI\n    4) Kimi (Moonshot, via Claude Code)\n    5) OpenCode\n\n  >\n```\n\nOr name it directly: `ccglass claude`, `ccglass codex`, `ccglass deepseek`,\n`ccglass deepseek-tui`, or `ccglass kimi`.\n\n`ccglass` starts a proxy, points the client at it via the right base-URL env var,\nlaunches it for you, and opens a dashboard where you watch every request in real\ntime — the full system prompt, every tool schema, the message history,\ntoken\u002Fcache\u002Fcost numbers, and a turn-to-turn diff.\n\n```\n  ● ccglass watching Codex (OpenAI) → https:\u002F\u002Fapi.openai.com\n    dashboard: http:\u002F\u002F127.0.0.1:57633\n```\n\n## Why\n\nThese CLIs are Node\u002Fnative apps that **ignore `HTTP_PROXY`\u002F`HTTPS_PROXY`** — so\nCharles\u002Fmitmproxy never see the traffic, and `fetch`-patching tools break across\nupdates. `ccglass` sidesteps all of it: the client does the HTTPS to the real API\nitself; you only intercept the plain HTTP hop to localhost. No CA certs, no TLS\npinning.\n\n## Providers\n\n| `ccglass \u003Cprovider>` or `--provider` | Wraps | Env var | Upstream | Format |\n|---|---|---|---|---|\n| `claude` | Claude Code | `ANTHROPIC_BASE_URL` | api.anthropic.com | Anthropic Messages |\n| `codex` | Codex | `OPENAI_BASE_URL` | api.openai.com | OpenAI Responses \u002F Chat |\n| `deepseek` | DeepSeek-TUI dispatcher | `DEEPSEEK_BASE_URL` | api.deepseek.com | OpenAI Chat |\n| `deepseek-tui` | DeepSeek-TUI runtime | `DEEPSEEK_BASE_URL` | api.deepseek.com | OpenAI Chat |\n| `kimi` | Claude Code → Moonshot | `ANTHROPIC_BASE_URL` | api.moonshot.ai\u002Fanthropic | Anthropic Messages |\n| `opencode` | OpenCode | `OPENAI_BASE_URL` | auto (from env) | OpenAI Chat |\n| `ollama` | any Ollama-backed client | `OPENAI_BASE_URL` | 127.0.0.1:11434 | OpenAI Chat |\n| `lmstudio` | any LM Studio-backed client | `OPENAI_BASE_URL` | 127.0.0.1:1234 | OpenAI Chat |\n| `openrouter` | any OpenRouter-backed client | `OPENAI_BASE_URL` | openrouter.ai\u002Fapi | OpenAI Chat |\n| `glm` | any GLM\u002FZhipu-backed client | `OPENAI_BASE_URL` | auto (from env) | OpenAI Chat |\n| `bedrock` | Claude Code → AWS Bedrock | `ANTHROPIC_BASE_URL` | auto (from env) | Anthropic Messages |\n| `vertex` | Claude Code → Google Vertex AI | `ANTHROPIC_BASE_URL` | auto (from env) | Anthropic Messages |\n| `run --provider \u003Cp> -- \u003Ccmd>` | any client | per provider | per provider | per provider |\n\n**Notes by provider:**\n\n- **Codex** — captures traffic when Codex is in **API-key mode** (`OPENAI_API_KEY`). If Codex is authenticated via **ChatGPT login**, it uses a WebSocket transport (`wss:\u002F\u002Fchatgpt.com\u002F...`) that bypasses `OPENAI_BASE_URL` — the dashboard will be empty. Run `codex doctor` to check your auth mode; if it shows `auth mode: chatgpt`, switch to API-key mode to use ccglass.\n- **Kimi** — runs through Claude Code against Moonshot's Anthropic-compatible endpoint; set `ANTHROPIC_AUTH_TOKEN` to your Moonshot key.\n- **DeepSeek-TUI** — OpenAI-compatible Chat Completions; set `DEEPSEEK_API_KEY`.\n- **OpenCode** — auto-detects upstream from `OPENAI_BASE_URL`; set it before running. Use `--env-var` if your OpenCode provider uses a different env var name.\n- **Ollama \u002F LM Studio** — no key needed for local models; pass `--upstream` if your server runs on a non-default address.\n- **OpenRouter** — set `OPENAI_API_KEY` to your OpenRouter key.\n- **GLM\u002FZhipu** — set `OPENAI_BASE_URL` to your Zhipu endpoint (e.g. `https:\u002F\u002Fopen.bigmodel.cn\u002Fapi\u002Fpaas\u002Fv4`) and `OPENAI_API_KEY` to your Zhipu key.\n- **AWS Bedrock** — set `ANTHROPIC_BASE_URL` to your Bedrock runtime endpoint (e.g. `https:\u002F\u002Fbedrock-runtime.us-east-1.amazonaws.com`) before running; AWS credentials are forwarded as-is from your environment.\n- **Google Vertex AI** — set `ANTHROPIC_BASE_URL` to your Vertex AI endpoint (e.g. `https:\u002F\u002Fus-east5-aiplatform.googleapis.com`) before running; GCP credentials are forwarded as-is.\n\n### Custom provider recipe\n\nAny tool that reads a base-URL env var can be inspected with the generic escape hatch:\n\n```bash\n# OpenAI-compatible tool with a custom endpoint\nccglass run \\\n  --upstream https:\u002F\u002Fmy.custom.api\u002Fv1 \\\n  --env-var MY_CUSTOM_BASE_URL \\\n  -- my-tool [args...]\n\n# Shorthand alias\nccglass run --base-url https:\u002F\u002Fmy.custom.api\u002Fv1 --env-var MY_BASE_URL -- my-tool\n\n# Reuse an existing provider's format but point at a different upstream\nccglass run --provider openai --upstream https:\u002F\u002Fmy.openai-compat.api -- my-tool\n```\n\n## What you get\n\n- **Live request stream** — every call appears instantly; click to expand the\n  system prompt, messages, and tools with all escaped strings unescaped. Long\n  blocks fold behind a show\u002Fhide toggle; each row shows its timestamp and a\n  tool-call count.\n- **Conversation flow** — a top-to-bottom sequence diagram of the agent loop:\n  which tool the model picked from the menu, how it ran locally, and how the\n  result was fed back. `tool_use` and `tool_result` are paired by `call_id` and\n  color-coded; skill calls are flagged.\n- **Turn-to-turn diff** — pick two requests, see exactly what context was added\n  this turn and which blocks carry a cache breakpoint.\n- **Token \u002F cache \u002F cost** — exact input\u002Foutput\u002Fcache tokens from the response\n  `usage`, cache-hit rate, and estimated USD per request (per-provider pricing).\n- **Response reassembly + export** — streamed SSE rebuilt into the final message\n  (`stop_reason`, tool calls, usage), for both the Anthropic and OpenAI wire\n  formats; export any request to a readable **raw** HTTP transcript, Markdown,\n  JSON, or HAR.\n- **Self-inspection (MCP)** — when wrapping Claude Code, ccglass registers its\n  own query tools so the agent can inspect the very requests it just made, right\n  inside the chat (`--no-mcp` to skip).\n\n## Usage\n\n```bash\nccglass                       # pick a client interactively\nccglass claude [args...]      # inspect Claude Code (args pass through, e.g. --resume)\nccglass codex  [args...]      # inspect Codex\nccglass deepseek [args...]    # inspect DeepSeek-TUI (dispatcher)\nccglass deepseek-tui [args...] # inspect DeepSeek-TUI runtime directly\nccglass kimi   [args...]      # inspect Kimi (via Claude Code)\nccglass opencode [args...]    # inspect OpenCode (auto-detects upstream from OPENAI_BASE_URL)\nccglass run --provider openai -- \u003Ccmd...>   # inspect any client\nccglass view                  # re-open the dashboard over saved .ccglass\u002F logs\nccglass export \u003Cid> --format raw|md|json|har   # raw = readable HTTP transcript\n```\n\n### Options\n\n| Flag | Default | Meaning |\n|---|---|---|\n| `--provider \u003Cp>` | from command | Force format\u002Fenv for `run` (`claude`\u002F`codex`\u002F`deepseek`\u002F`kimi`\u002F`openai`) |\n| `--upstream \u003Curl>` | per provider | Override the upstream API |\n| `--port \u003Cn>` | auto | Dashboard port |\n| `--proxy-port \u003Cn>` | auto | Proxy port |\n| `--dir \u003Cpath>` | `.\u002F.ccglass` | Where logs are stored |\n| `--no-open` | off | The dashboard opens in your browser by default; pass this to skip it |\n| `--no-mcp` | off | Don't inject ccglass's self-inspection tools into Claude Code |\n| `--no-settings-override` | off | Don't force Claude Code onto the proxy via `--settings` (for when a provider switcher set `ANTHROPIC_BASE_URL`) |\n| `--no-redact` | off | Keep auth tokens unmasked in saved logs |\n| `--env-var \u003Cname>` | per provider | Override the environment variable used to set the proxy URL |\n\n## Logs & secrets\n\nCaptures are written to `.\u002F.ccglass\u002F\u003Csession>\u002FNNNN.json`. Auth tokens\n(`authorization`, `x-api-key`) are **masked by default** — pass `--no-redact`\nto keep them. Treat the log directory as sensitive regardless.\n\n## Requirements\n\nNode ≥ 18. The core proxy + dashboard have no runtime dependencies; the\noptional MCP self-inspection feature (`ccglass claude`) pulls in\n`@modelcontextprotocol\u002Fsdk` and `zod`.\n\n## Issues\n\nOpen an [issue](https:\u002F\u002Fgithub.com\u002Fjianshuo\u002Fccglass\u002Fissues\u002Fnew) and Claude picks\nit up automatically — it investigates against the code, and if it's a real,\nwell-scoped bug or small feature, opens a fix PR that references your issue. Keep\niterating by commenting `@claude` on the issue or the PR. Claude only ever opens\nPRs for review; a maintainer merges and releases.\n\n## Acknowledgments\n\nHeartfelt thanks to **庄表伟 ([@zhuangbiaowei](https:\u002F\u002Fgithub.com\u002Fzhuangbiaowei))** for\ncontributing **first-class DeepSeek-TUI support** ([#1](https:\u002F\u002Fgithub.com\u002Fjianshuo\u002Fccglass\u002Fpull\u002F1)).\n\nDeepSeek-TUI ships as a dual-binary coding agent — a `deepseek` dispatcher and a\n`deepseek-tui` runtime. 庄表伟 wired up both as native ccglass providers, pointing\nthem at the proxy via `DEEPSEEK_BASE_URL` and reusing the existing\nOpenAI-compatible Chat Completions adapter, so every DeepSeek request now shows up\nin the dashboard with zero extra setup. The contribution also added them to the\ninteractive picker, documented usage across the README, and shipped provider\nregression tests to keep it working. Thank you for making ccglass better for the\nwhole DeepSeek community. 🙏\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?repos=jianshuo%2Fccglass&type=date&legend=top-left\">\n \u003Cpicture>\n   \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=jianshuo\u002Fccglass&type=date&theme=dark&legend=top-left\" \u002F>\n   \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=jianshuo\u002Fccglass&type=date&legend=top-left\" \u002F>\n   \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=jianshuo\u002Fccglass&type=date&legend=top-left\" \u002F>\n \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n## License\n\nMIT\n","ccglass 是一个用于监控编码代理（如 Claude Code、Codex、Kimi 等）发送给模型数据的工具，包括本地反向代理和网页仪表盘。其核心功能是通过轻量级的本地日志记录，实现实时请求捕获，并在仪表盘上展示系统提示、工具模式、消息历史、令牌\u002F缓存\u002F成本等信息，以及逐回合差异。该工具特别适用于需要深入了解编码代理与模型之间交互细节的开发者或研究人员。采用 JavaScript 编写，支持多种流行的编码代理服务，易于安装和使用，只需一条命令即可启动。",2,"2026-06-11 03:56:51","CREATED_QUERY"]