@jianshuo: 看得见,才谈得上理解。我写了个 ccglass,npm 装上就能看到 Claude Code 背地里给大模型发了什么——系统提示词、48 个工具、token 账,全摊开。
摘要
ccglass是一个零依赖的本地日志反向代理和Web仪表盘,可以让你实时查看Claude Code等编码代理发送给大模型的系统提示、工具和token使用情况。
查看缓存全文
缓存时间: 2026/05/23 14:11
看得见,才谈得上理解。我写了个 ccglass,npm 装上就能看到 Claude Code 背地里给大模型发了什么——系统提示词、48 个工具、token 账,全摊开。https://t.co/99thvxcoqh
jianshuo/ccglass
Source: https://github.com/jianshuo/ccglass
ccglass
See exactly what your coding agent sends to the model. A zero-dependency
local logging reverse-proxy + web dashboard for Claude Code, Codex,
DeepSeek-TUI, and Kimi.
One command, like ollama:
npm install -g ccglass
ccglass
Run with no arguments and ccglass asks which client to inspect:
Which client do you want to inspect?
1) Claude Code
2) Codex (OpenAI)
3) DeepSeek-TUI
4) Kimi (Moonshot, via Claude Code)
>
Or name it directly: ccglass claude, ccglass codex, ccglass deepseek,
ccglass deepseek-tui, or ccglass kimi.
ccglass starts a proxy, points the client at it via the right base-URL env var,
launches it for you, and opens a dashboard where you watch every request in real
time — the full system prompt, every tool schema, the message history,
token/cache/cost numbers, and a turn-to-turn diff.
● ccglass watching Codex (OpenAI) → https://api.openai.com
dashboard: http://127.0.0.1:57633
Why
These CLIs are Node/native apps that ignore HTTP_PROXY/HTTPS_PROXY — so
Charles/mitmproxy never see the traffic, and fetch-patching tools break across
updates. ccglass sidesteps all of it: the client does the HTTPS to the real API
itself; you only intercept the plain HTTP hop to localhost. No CA certs, no TLS
pinning.
Supported clients
ccglass <client> | Wraps | Env var | Upstream | Format |
|---|---|---|---|---|
claude | Claude Code | ANTHROPIC_BASE_URL | api.anthropic.com | Anthropic Messages |
codex | Codex | OPENAI_BASE_URL | api.openai.com | OpenAI Responses / Chat |
deepseek | DeepSeek-TUI dispatcher | DEEPSEEK_BASE_URL | api.deepseek.com | OpenAI Chat |
deepseek-tui | DeepSeek-TUI runtime | DEEPSEEK_BASE_URL | api.deepseek.com | OpenAI Chat |
kimi | Claude Code → Moonshot | ANTHROPIC_BASE_URL | api.moonshot.ai/anthropic | Anthropic Messages |
run --provider <p> -- <cmd> | any client | per provider | per provider | per provider |
Kimi runs through Claude Code against Moonshot’s Anthropic-compatible endpoint —
make sure your Moonshot key is set (ANTHROPIC_AUTH_TOKEN).
DeepSeek-TUI uses its OpenAI-compatible Chat Completions endpoint — make sure
your DeepSeek key is set (DEEPSEEK_API_KEY).
What you get
- Live request stream — every call appears instantly; click to expand the system prompt, messages, and tools with all escaped strings unescaped.
- Turn-to-turn diff — pick two requests, see exactly what context was added this turn and which blocks carry a cache breakpoint.
- Token / cache / cost — exact input/output/cache tokens from the response
usage, cache-hit rate, and estimated USD per request (per-provider pricing). - Response reassembly + export — streamed SSE rebuilt into the final message
(
stop_reason, tool calls, usage), for both the Anthropic and OpenAI wire formats; export any request to Markdown / JSON / HAR.
Usage
ccglass # pick a client interactively
ccglass claude [args...] # inspect Claude Code (args pass through, e.g. --resume)
ccglass codex [args...] # inspect Codex
ccglass deepseek [args...] # inspect DeepSeek-TUI (dispatcher)
ccglass deepseek-tui [args...] # inspect DeepSeek-TUI runtime directly
ccglass kimi [args...] # inspect Kimi (via Claude Code)
ccglass run --provider openai -- <cmd...> # inspect any client
ccglass view # re-open the dashboard over saved .ccglass/ logs
ccglass export <id> --format md|json|har
Options
| Flag | Default | Meaning |
|---|---|---|
--provider <p> | from command | Force format/env for run (claude/codex/deepseek/kimi/openai) |
--upstream <url> | per provider | Override the upstream API |
--port <n> | auto | Dashboard port |
--proxy-port <n> | auto | Proxy port |
--dir <path> | ./.ccglass | Where logs are stored |
--open | off | Open the dashboard in your browser |
--no-redact | off | Keep auth tokens unmasked in saved logs |
Logs & secrets
Captures are written to ./.ccglass/<session>/NNNN.json. Auth tokens
(authorization, x-api-key) are masked by default — pass --no-redact
to keep them. Treat the log directory as sensitive regardless.
Requirements
Node ≥ 18. No runtime dependencies.
Acknowledgments
Heartfelt thanks to 庄表伟 (@zhuangbiaowei) for contributing first-class DeepSeek-TUI support (#1).
DeepSeek-TUI ships as a dual-binary coding agent — a deepseek dispatcher and a
deepseek-tui runtime. 庄表伟 wired up both as native ccglass providers, pointing
them at the proxy via DEEPSEEK_BASE_URL and reusing the existing
OpenAI-compatible Chat Completions adapter, so every DeepSeek request now shows up
in the dashboard with zero extra setup. The contribution also added them to the
interactive picker, documented usage across the README, and shipped provider
regression tests to keep it working. Thank you for making ccglass better for the
whole DeepSeek community. 🙏
License
MIT
相似文章
@koffuxu: https://x.com/koffuxu/status/2054527573439181206
cc-switch 是一个桌面应用,帮助用户通过可视化界面一键切换 Claude Code 使用的底层大模型,无需手动修改配置文件。文章介绍了如何安装配置以接入 DeepSeek 模型,并解释了其工作原理。
@Khazix0918: https://x.com/Khazix0918/status/2046082879109959807
这篇文章是一份面向中国用户的Claude Code从零开始安装和使用教程,涵盖Mac和Windows系统的安装方法(含无VPN情况),以及如何接入国产模型(如GLM-5.1)替代Claude原生模型。
@_zheergen: 兄弟们!我刚刚刷到一个开源项目,真的让我停了一下。 是 cogsec 大佬 @affaan 的开源项目叫 Everything Claude Code,简称 ECC。GitHub 205K 项目地址:https://github.com/…
一个名为ECC(Everything Claude Code)的开源项目,集成了63个Agent、249个Skills和内置安全测试,支持Claude Code、Codex、Cursor等多种AI编码工具,旨在简化AI编程工作流搭建。
@nash_su: https://x.com/nash_su/status/2055541927508881654
本文详细介绍了Claude Code在大型代码库中的最佳实践,强调工具链(CLAUDE.md、钩子、技能、插件、LSP集成、MCP服务器和子代理)比模型本身更重要,并建议团队优先投资代码库设置以获得更好效果。
@aehyok: Claude 桌面端通过 CC Switch 对接国产大模型 DeepSeek,我看到CC Switch 作者都引用了雨哥的帖子。 于是我跟着雨神哥 @xiangxiang103 的文章,实操了一把。雨哥用了五分钟,我这里满打满算其实三分…
作者通过CC Switch工具将Claude桌面端与DeepSeek模型对接,并参考了雨神哥的教程,实际操作仅需三分钟。