# Repository Briefing: teamchong/pxpipe
> Source: https://repoforai.com/repo/teamchong/pxpipe (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/teamchong/pxpipe
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (95/100 · Maintenance 35/35 · Adoption 20/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.18.4 (2026-12-02) — https://github.com/teamchong/pxpipe/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, CLI, API
- **Momentum**: 8,052 ★ total (+10 24h / +28 7d) · 698 forks
- **When to Use**: Best for: Teams running long coding-agent sessions with dense logs, JSON, or tool output, on a vision model that passes their own exact-read and task tests. Skip if: Your model misreads dense glyphs, exact text is essential, native thread or WebSocket behavior must stay intact, or provider terms prohibit the integration.

## Overview
```text
### Architecture & Core Mechanics
pxpipe is a TypeScript request proxy, not an MCP server. It transforms tool documentation and history once the coding client has assembled the model request. The pipeline resolves the model ID to a render profile, reflows eligible blocks into dense PNG pages, adds a bounded text factsheet, and forwards the rewritten payload. Recent turns remain text, sparse prose can stay unconverted, and the proxy does not compress the response stream.

It handles Anthropic Messages, OpenAI Responses and Chat Completions, and Google `generateContent`. Requests can retain their provider-native format, or Anthropic Messages can be bridged to a configured OpenAI-compatible upstream. The Anthropic path preserves the static prefix and prompt-cache boundary. The runtime is JavaScript on Node and Cloudflare Workers, with `gpt-tokenizer` as the sole declared runtime dependency and `@napi-rs/canvas` used only at build time. `src/core/index.ts` exposes rendering and transformation without requiring a running proxy.

### Key Capabilities & Differentiators
The savings depend on how much text fits into pixels each model can still read. One example converts roughly 48,000 characters of system prompt and tool docs from about 25,000 text tokens to 2,700 image tokens. On a separate 454,045-character dense fixture, the Claude 5×8 profile estimated 80.6% savings versus 46.7% for Sol's 14px profile, using the same text-token estimate and each provider's image-token formula. These are profile costs on specific inputs, not bill forecasts.

Paired pilots on the original `claude-fable-5` offer a task-level check: SWE-bench Lite finished 10/10 in both modes at 65% lower request size, while Pro finished 14/19 with pxpipe versus 15/19 with text at 60% lower request size. The dashboard shows conversions side by side and provides a kill switch. `pxpipe stats` reads `~/.pxpipe/events.jsonl` after shutdown, while `pxpipe export` creates PNGs and companion text files without connecting to an upstream.

### Trade-offs & Limitations
Direct text requests make exact strings available without a visual decoding step. Native prompt caching reduces the cost of repeated prefixes; pxpipe tackles a different problem by changing the representation of eligible context, not just reusing it. Model choice is the main constraint: Gemini 4 Argon scored 15/15 on pure-image dense hex, while the tested Opus, Sonnet, and Haiku 5.5 variants scored 0–3/15. Fable 5.1 and 5.2 improved with two extra pixels between rows, at about 25% more image tokens than the unspaced layout. Test exact identifiers and task completion, not just gist recall or nominal context capacity.

The proxy needs the full context in the outgoing request. Claude Code 2.1.281 and later can send only deltas for server-side threads, so `warp` defaults the child process to `CLAUDE_CODE_TETHER_LIVE=0`, an undocumented setting that may change. For matched Codex WebSocket upgrades, the proxy returns HTTP 426 to trigger full-context HTTP SSE. These compatibility changes matter if you rely on native stateful transport. Compare actual provider spend and latency with a direct, cache-enabled baseline before rolling it out.

### Hardware & Deployment Guide
Start locally with `npx pxpipe-proxy`, then run `pxpipe warp -- claude` with the CLI available. The package requires Node 20.19 or later; decoding Codex's zstd-compressed request bodies requires Node 22.15 or later. Docker Compose publishes `127.0.0.1:${PXPIPE_PORT:-47821}` to container port `47821`, makes the root filesystem read-only, drops all capabilities, sets `no-new-privileges`, and mounts `pxpipe-data` at `/data`.

`wrangler.toml` and `deploy:worker` provide a Cloudflare Workers deployment path. No local inference accelerator is required; size CPU and memory against payload size, rendered page count, and concurrent requests rather than model VRAM. Treat the proxy and any enabled request dumps as sensitive because the proxy handles prompt and tool content. v0.18.2 addressed history trimming and request-size accounting, v0.18.3 fixed cache liveness, gzip retry blacklisting, and carry-over anchor handling, and v0.18.4 fixed Anthropic input-usage accounting across SSE deltas.
```

## Key Capabilities
```text
- Integration: `pxpipe warp -- claude` launches Claude Code through the request proxy without an `ANTHROPIC_BASE_URL` override.
- Protocol coverage: Anthropic Messages, OpenAI Responses and Chat Completions, and Google `generateContent`, plus bridging from Anthropic Messages to an OpenAI-compatible upstream.
- Transformation controls: Model profiles set page geometry, history retention, and conversion thresholds; the library's `keepSharp` hook pins selected blocks as text.
- Evaluation: Gemini 4 Argon scored 15/15 on pure-image dense hex and 100/100 on pure-image arithmetic; the tested Claude 5.5 variants scored 0–3/15 on dense hex.
- Measurement: `pxpipe stats --json` aggregates the local event log; Anthropic token savings are measured against a `count_tokens` counterfactual.
- Offline workflow: `pxpipe export` accepts files, stdin, or a Git diff and produces PNG pages, a factsheet, a manifest, and a companion prompt.
```

## Quick Start / Clone
```bash
npx pxpipe-proxy                                  # proxy on 127.0.0.1:47821
pxpipe warp -- claude                             # Claude Code (or: codex, omp, opencode)
```
