npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

stitcher-proxy

v1.0.0

Published

Universal infinite-memory proxy for LLMs. LLMs have amnesia. Stitcher is the cure.

Readme

🧵 Stitcher Proxy

LLMs have amnesia. Stitcher is the cure.

A transparent proxy that gives any LLM infinite memory. Zero dependencies. One command.


Install

npm install -g stitcher-proxy

Or run without installing:

npx stitcher-proxy

Or one-liner:

curl -fsSL https://raw.githubusercontent.com/Djsand/stitcher-proxy/main/install.sh | bash

How It Works

You point your LLM client at Stitcher instead of OpenAI/Anthropic directly. Stitcher intercepts every request, stitches in the full conversation history from local storage, and forwards it upstream. Your LLM gets maximum context every time. Transparently.

┌─────────┐     POST /v1/chat/completions      ┌──────────────────┐
│  Your    │ ─────────────────────────────────▶ │  Stitcher Proxy  │
│  App     │    (only new messages)             │                  │
└─────────┘                                     │  1. Save to JSONL│
     ▲                                          │  2. Stitch history│
     │                                          │  3. Dedup        │
     │         Response (unchanged)             │  4. Token budget │
     └─────────────────────────────────────── ◀ │  5. Forward      │
                                                └────────┬─────────┘
                                                         │
                                                         ▼
                                                ┌──────────────────┐
                                                │  OpenAI/Anthropic│
                                                │  (full context)  │
                                                └──────────────────┘

Quick Start

# Setup (pick provider, set API key, configure token budget)
stitcher-proxy init

# Start the proxy
stitcher-proxy

# Auto-configure Claude Code, Codex, and all OpenAI clients
stitcher-proxy integrate all

Usage

Change your base_url. That's it.

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8081/v1",
    api_key="your-real-key",
    default_headers={"X-Stitcher-Session": "user-123"}
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "What did we talk about yesterday?"}]
)
# Stitcher injected the full history. The model remembers.
curl http://localhost:8081/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "X-Stitcher-Session: my-session" \
  -d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Continue where we left off."}]}'

Works With

Claude Code · Codex · Cursor · OpenClaw · LangChain · Vercel AI SDK · Ollama · vLLM · any OpenAI-compatible client

stitcher-proxy integrate all          # Configure everything
stitcher-proxy integrate claude-code  # Just Claude Code
stitcher-proxy integrate codex        # Just Codex

CLI Reference

stitcher-proxy                        Start the proxy
stitcher-proxy init                   Interactive setup wizard
stitcher-proxy start [--port N]       Start with options
stitcher-proxy status                 Config + session count
stitcher-proxy sessions               List sessions
stitcher-proxy sessions purge <name>  Delete a session
stitcher-proxy config                 Show all settings
stitcher-proxy config edit            Interactive config editor
stitcher-proxy config set <key> <val> Quick set a value
stitcher-proxy integrate [target]     Auto-configure integrations

Configuration

All settings are tunable via stitcher-proxy config edit:

| Setting | Default | Description | |---------|---------|-------------| | port | 8081 | Proxy port | | upstream_url | https://api.openai.com | Upstream LLM API | | max_tokens | 128000 | Token budget for stitched context | | dedup_threshold | 0.6 | Similarity cutoff for dedup (0-1) | | condense_threshold | 0.35 | Similarity cutoff for condensing | | chars_per_token | 4 | Token estimation ratio | | roll_size_bytes | 5242880 | File roll threshold (5MB) |

Config priority: CLI flags → env vars → ~/.stitcher/config.json → defaults

Under The Hood

Stitcher stores every message as a line in JSONL files. When context is needed:

  1. Read backward through archived files (newest → oldest)
  2. Deduplicate near-identical assistant messages via trigram similarity
  3. Budget — stop when token limit is reached
  4. Condense — replace older similar messages with placeholders
  5. Reverse — restore chronological order
  6. Forward — send the full context to upstream

Sessions auto-roll to numbered archives when files exceed the configured size.

License

MIT