gitwtfhub

wtf is pxpipe?

teamchong/pxpipe — explained in plain English

Analysis updated 2026-05-18

6,603TypeScriptAudience · developerComplexity · 4/5Setup · easy

TL;DR

A local proxy that shrinks Claude Code's token bill by rendering bulky text context, like system prompts and tool docs, as compact images instead.

Mindmap

mindmap
  root((pxpipe))
    What it does
      Renders text as images
      Cuts token costs
      Local proxy
    Tech stack
      TypeScript
      Node.js
    Use cases
      Long coding sessions
      Offline image export
      Cost dashboard
    Audience
      Developers
      Claude Code users
    Setup
      npx pxpipe-proxy
      Set ANTHROPIC_BASE_URL
      Dashboard monitoring

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Reduce the token cost of long Claude Code sessions by imaging bulky system prompts and tool docs.

REASON 2

Export code, files, or diffs as dense image pages for pasting into other AI tools that accept images.

REASON 3

Monitor a live dashboard of tokens saved and see each text-to-image conversion side by side.

What's in the stack?

TypeScriptNode.js

How it stacks up

teamchong/pxpipegetagentseal/codeburnsoftware-mansion/react-native-gesture-handler
Stars6,6036,6276,724
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyeasymoderate
Complexity4/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Works with a single npx command and one environment variable, savings and reliability vary a lot by model and content type.

Wtf does this do

pxpipe is a local proxy that sits between Claude Code, a command line coding assistant, and the AI model behind it, with one job: shrink the bill by turning bulky text context into compact images before it gets sent. The idea rests on a quirk of how vision models charge for images: the token cost of an image depends on its pixel size, not on how much text is packed inside it. Dense material like code or JSON fits far more characters per token as an image than as plain text, so rendering the system prompt, tool documentation, and older conversation history as small PNG pages instead of raw text can cut the token bill substantially, roughly sixty to seventy percent at the time this was written. Getting started takes one command to start the proxy and one environment variable to point Claude Code at it, after which a local dashboard shows tokens saved and every text-to-image conversion side by side, along with a kill switch to turn it off. Responses from the model still stream back as normal text, only the request going out gets compressed, and only the bulkier, older parts of it, while recent turns of conversation stay as plain text. There is also an offline mode that renders files or diffs into image pages without running the proxy at all, useful for pasting dense context into other tools that accept image uploads. The project is unusually direct about where this approach falls short. Compression is lossy: exact strings like long hex identifiers or secrets can be misread by the model, especially on models other than the default one, so anything that must be byte-exact is kept as text or routed to a different model entirely. Results also depend heavily on the specific model and the type of content: it saves money on dense, token-heavy content but can actually cost more on sparse prose, so a built-in profitability check decides when to image something at all. Different models get different image rendering profiles tuned to how well each one reads that format.

Yoink these prompts

Prompt 1
Help me set up pxpipe as a proxy in front of Claude Code and verify it's saving tokens.
Prompt 2
Explain why pxpipe's compression can misread exact hex strings or secrets and how to avoid that.
Prompt 3
Show me how to use pxpipe's offline export mode to render a git diff as images.
Prompt 4
Walk me through which models pxpipe images by default and how to enable an opt-in model.

Frequently asked questions

wtf is pxpipe?

A local proxy that shrinks Claude Code's token bill by rendering bulky text context, like system prompts and tool docs, as compact images instead.

What language is pxpipe written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js.

How hard is pxpipe to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pxpipe for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.