ccglass

A lightweight local logging reverse-proxy plus web dashboard that shows exactly what your coding agent — Claude Code, Codex, Kimi — sends to the model, in real time.

Source repo
jianshuo/ccglass
Stars
★ 851
Last updated
14d ago
License
MIT
Primary language
JavaScript

At a glance

How it runs
CLI
Works with
Universal · cross-platformClaude CodeCodex (Partial support)
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Node.js >= 18npm or HomebrewShell / CLINetwork accessLocal filesystemMCP Server
Typical use
An engineer debugging agent prompts who suspects Claude Code's system prompt or tool list differs from expectations and wants to read the raw request each turn.
Not a fit if
  • Codex users on ChatGPT-login mode — traffic bypasses the proxy and the dashboard stays empty
  • Teams needing to intercept Cursor subscription models or direct AWS Bedrock endpoints
  • Users unwilling to disable proxyStrictSSL and trust a local CA in their IDE
Source review
74/100 · Some gaps

What does this agent do, and when should you use it?

ccglass is a local logging reverse-proxy with a web dashboard for observing the real requests made by coding-agent CLIs. It redirects traffic by setting the client's base-URL environment variable (e.g. ANTHROPIC_BASE_URL, OPENAI_BASE_URL); the client still performs its own HTTPS to the real API, so no CA certificates are needed and TLS pinning is avoided. The dashboard shows the full system prompt, tool schemas, message history, token/cache/cost numbers, a turn-to-turn diff, and a sequence diagram of the agent loop. Supported clients include Claude Code, Codex, DeepSeek-TUI, Reasonix, CodeBuddy, Kimi, and OpenCode, with upstreams spanning Ollama, LM Studio, OpenRouter, AWS Bedrock, and Google Vertex AI. For clients with hardcoded upstream URLs (like Tencent's CodeBuddy), it offers a forward-proxy mode with targeted TLS MITM. Captures are stored content-addressed (git-style) under ~/.ccglass/sessions/ with auth tokens masked by default. It installs globally via npm or Homebrew and starts with a single command.

Running ccglass (or ccglass claude, ccglass codex, etc.) starts a local proxy, points the client at it via the right base-URL env var, launches the client, and opens a dashboard at http://127.0.0.1:<port>. The dashboard provides: a live request stream (expandable system prompt, messages, tools), an agent-loop sequence diagram pairing tool_use and tool_result by call_id with color coding, a turn-to-turn diff highlighting added context and cache breakpoints, exact token/cache-hit/cost numbers from response usage, streamed SSE reassembled into final messages, export to raw HTTP / Markdown / JSON / HAR, session summaries, per-request latency with trend sparklines, Copy as cURL replay, light/dark themes, and optional MCP self-inspection (registers query tools into Claude Code so the agent can inspect its own requests; disable with --no-mcp). Captures go to ~/.ccglass/sessions/<project-path>-<hash>/ in content-addressed format with authorization and x-api-key masked; ccglass view reopens saved logs, ccglass migrate copies legacy ./.ccglass data into the global store, and ccglass export dumps a specific request. For CodeBuddy, whose upstream copilot.tencent.com is hardcoded, ccglass codebuddy runs a forward proxy intercepting HTTP CONNECT tunnels with targeted TLS MITM and an auto-generated local CA.

  1. An engineer debugging agent prompts who suspects Claude Code's system prompt or tool list differs from expectations and wants to read the raw request each turn.
  2. A team controlling API spend that needs per-request token, cache-hit-rate, and estimated USD figures to see where a session's cost comes from.
  3. A developer investigating context bloat, using the turn-to-turn diff to see exactly which blocks were added this turn and where cache breakpoints land.
  4. A user of local or third-party models who inspects OpenAI-compatible clients via ccglass ollama, lmstudio, openrouter, or glm providers.
  5. A Tencent CodeBuddy user whose built-in models hardcode copilot.tencent.com and therefore require the forward-proxy mode (HTTP CONNECT + TLS MITM).
  6. An IDE user (Cursor BYOK, Cline, Continue.dev) who runs ccglass proxy and points the IDE's API base URL at the proxy address to observe requests.

How do you install or deploy this agent?

Requires Node.js >= 18. Install with either:

npm install -g ccglass

or:

brew install jianshuo/tap/ccglass

How do you use this agent?

Basic usage:

ccglass            # interactively pick a client to inspect
ccglass claude     # inspect Claude Code (args pass through, e.g. --resume)
ccglass codex      # inspect Codex (API-key mode required; ChatGPT login uses WebSocket and bypasses the proxy)
ccglass kimi       # Claude Code to Moonshot; set ANTHROPIC_AUTH_TOKEN
ccglass codebuddy  # forward-proxy mode; set "http.proxy": "http://127.0.0.1:9999" and "http.proxyStrictSSL": false in your IDE

Each client needs its own credentials (OPENAI_API_KEY, DEEPSEEK_API_KEY, Zhipu's OPENAI_API_KEY, etc.). Generic escape hatch for any client:

ccglass run --upstream https://my.custom.api/v1 --env-var MY_CUSTOM_BASE_URL -- my-tool

Proxy-only mode for IDEs:

ccglass proxy --provider openai

Other commands: ccglass view (reopen dashboard over saved logs), ccglass usage (token + USD rollup), ccglass export <session>/<seq> --format raw|md||har, ccglass migrate, ccglass rm <session>. The dashboard runs at a URL like http://127.0.0.1:57633; press Ctrl-C to stop.

What are this agent's strengths and limitations?

Pros
  • Intercepts only the plain HTTP hop to localhost via base-URL env vars while the client does its own HTTPS — no CA certs needed, and it sidesteps TLS pinning and brittle fetch-patching.
  • Broad coverage: native providers for Claude Code, Codex, DeepSeek-TUI, Reasonix, CodeBuddy, Kimi, OpenCode, Qoder, Ollama, LM Studio, OpenRouter, GLM/Zhipu, Bedrock, and Vertex, plus a generic run + --env-var escape hatch.
  • Feature-rich dashboard: live request stream, agent-loop sequence diagram, turn-to-turn diff, exact token/cache/cost, SSE reassembly, raw/MD/JSON/HAR export, Copy as cURL, and theming.
  • Auth tokens are masked by default and content-addressed storage prevents quadratic log growth; optional MCP self-inspection lets the agent query its own requests in-chat.
Limitations
  • Codex capture only works in API-key mode; ChatGPT-login mode uses a wss://chatgpt.com WebSocket transport that bypasses OPENAI_BASE_URL, leaving the dashboard empty.
  • Direct AWS Bedrock endpoints (*.amazonaws.com) fail through the proxy because SigV4 signs the Host header — only Bedrock-compat gateways work.
  • IDE support is limited to BYOK custom base-URL setups; Cursor's subscription models route through api2.cursor.sh and cannot be intercepted.
  • CodeBuddy's TLS MITM requires disabling proxyStrictSSL and trusting an auto-generated local CA — invasive settings that must be manually cleaned up afterwards.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
ccglass This agent 74 · Some gaps CLIFree + model costs ★ 851 14d ago JavaScript Claude Code
ccxray 73 · Some gaps CLIFree + model costs ★ 295 2d ago JavaScript Claude Code · Claude API
ccusage 67 · Some gaps — ★ 19k today Rust Codex · Claude Code
Claude DevTools 56 · Major gaps Desktop appFree ★ 4k 29d ago TypeScript Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
74/ 100 5-point scale 3.7 / 5
Trust 19/29
Reliability 9/14
Adaptability 15/18
Convention 14/18
Effectiveness 12/13
Verifiability 5/8
Why each dimension lost points
Trust19 / 29 · 3.3/5

Evidence: tool intercepts only the plain-HTTP localhost hop by default, masks auth tokens by default (--no-redact opt-out), CodeBuddy MITM is host-scoped to copilot.tencent.com with other HTTPS passing through, CA key stays in a session dir without system trust. Deducted: masking/interception implementation code is not in evidence, so static verification is impossible; CodeBuddy mode instructs disabling proxyStrictSSL, which lowers security posture.

Reliability9 / 14 · 3.2/5

Evidence: node --test suite covers session resolution, blob store, and CA generation; prepublishOnly enforces tests; the Codex ChatGPT-login blind spot is documented with a diagnostic (codex doctor). Deducted: Bedrock direct-endpoint failure is only warned about rather than fixed; no retry/failure-recovery mechanism is described.

Adaptability15 / 18 · 4.2/5

Evidence: audience (developers debugging coding agents) and scenarios (CLI wrap, IDE BYOK, forward-proxy) are clearly segmented; limitations (Cursor subscription models, SigV4 Host signing) are stated. Deducted: environment guidance is macOS/Node-centric; Windows has a single PR mention, thin cross-platform evidence.

Convention14 / 18 · 3.9/5

Evidence: README is well structured (why/providers table/usage/options/logs), MIT LICENSE matches package., dual install channels (npm/brew), detailed contributor attribution with PR links. Deducted: no CHANGELOG file — version history is inferable only from git tags; tests cover only three modules and src is absent from evidence; alias naming (dsnix, reasonix) rests on docs, not structure.

Effectiveness12 / 13 · 4.6/5

Evidence: rich output forms (dashboard, raw/md//har export, copy-as-cURL, usage rollup), content-addressed storage avoids quadratic growth, clear marginal value for the 'see what the agent sends' need. Deducted: cost estimation depends on a per-provider price table with no stated source or update mechanism; MCP self-inspection is injected by default requiring --no-mcp to opt out, making its cost/benefit implicit.

Verifiability5 / 8 · 3.1/5

Evidence: README claims cross-check with package. (bin, engines, deps) and the shipped tests (blobs, CA, session naming); contributor claims point to specific PR numbers. Deducted: demo.gif is unverifiable external media; the core proxy source is not in evidence; the 'no runtime dependencies' claim versus three entries in dependencies (explained as optional MCP) requires user-side verification.

Risks and how to mitigate them
  • Static review executed no code: masking logic, MITM scope, and dependency security rest on README and test assertions only; src was not in evidence.
  • CodeBuddy mode asks you to disable proxyStrictSSL to trust an auto-generated CA; always remove the proxy settings afterwards and never expose the CA key directory or add it to system trust.
  • Captured logs contain full prompts and message histories; even with default token masking, treat ~/.ccglass as sensitive and never commit or share it.
  • MCP self-inspection tools are injected into Claude Code sessions by default; pass --no-mcp if unwanted.
  • No CHANGELOG exists; behavioral differences around v1.1.2 must be compared via git history or release notes yourself.
  • Direct AWS Bedrock endpoints fail through the proxy due to SigV4 Host signing with only a printed warning — do not mistake it for a network fault.
Evidence confidence: Low Reviewed Sep 10, 2026 Reviewed revision 8340714ad3aa New commits since this review; the score may not cover them
See the full review method →
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents