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

claudesclaude

v1.1.1

Published

Local API proxy that mirrors the Anthropic Messages API by automating Claude's web UI with Puppeteer

Downloads

35

Readme

ClaudesClaude

Problem

You're building a local web app that needs LLM API access. But paying per-token through the Anthropic API adds up fast — especially for hobby projects, prototyping, or personal tools where you're iterating constantly. You're already paying for a Claude Pro/Max subscription, but there's no way to use it programmatically.

Solution

ClaudesClaude is a local API proxy that mirrors the Anthropic Messages API — but routes requests through your existing Claude subscription instead of the paid API. Your code talks to localhost:3456 using the same Anthropic SDK and request format it already uses. Just swap the baseURL and you're done. No API keys, no per-token billing.

Two modes:

| Mode | Command | Speed | Requires | |---|---|---|---| | CLI tunnel (default) | npx claudesclaude | ~3-5s per request | Claude Code CLI installed | | Browser automation | npx claudesclaude --browser | ~15-30s per request | Google Chrome |

Quick Start

Default (CLI tunnel)

Pipes requests through the Claude Code CLI. No browser needed, instant startup.

npx claudesclaude

Requires claude CLI in your PATH. Install it from claude.ai/claude-code.

Browser Mode

Automates Claude's web UI with Puppeteer. Slower but works without the Claude Code CLI.

npx claudesclaude --browser

Opens Chrome, navigates to claude.ai, waits for you to log in (first time only — session is persisted).

Usage

With the Anthropic SDK

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "http://localhost:3456",
  apiKey: "unused",
});

const response = await client.messages.create({
  model: "claude-sonnet-4-20250514",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(response.content[0].text);

With curl

curl -X POST http://localhost:3456/v1/messages \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 256,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Streaming

curl -N -X POST http://localhost:3456/v1/messages \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 256,
    "stream": true,
    "messages": [{"role": "user", "content": "Tell me a story."}]
  }'

API Endpoints

| Endpoint | Method | Description | |---|---|---| | /v1/messages | POST | Send a message (matches Anthropic API format) | | /v1/models | GET | List available models | | /health | GET | Check if the session is ready | | /debug/screenshot | GET | PNG screenshot of browser (browser mode only) | | /debug/info | GET | Current page URL and title (browser mode only) |

Environment Variables

| Variable | Default | Description | |---|---|---| | PORT | 3456 | API server port | | HEADLESS | false | Run Chrome headless (browser mode only) | | CHROME_PATH | auto-detected | Path to Chrome/Chromium (browser mode only) | | CLAUDE_CLI_PATH | claude | Path to Claude Code CLI (CLI mode only) |

How It Works

CLI Tunnel Mode

  1. Receives an API request matching the Anthropic Messages format
  2. Spawns claude -p --output-format json as a subprocess
  3. Passes the prompt via stdin, reads structured JSON from stdout
  4. Returns the response in Anthropic API format
  5. For streaming: uses --output-format stream-json --include-partial-messages

Browser Mode

  1. Launches your system Chrome via puppeteer-core
  2. Navigates to claude.ai and waits for login
  3. Persists session in ~/.claudesclaude/browser-data/
  4. For each request: opens a new conversation, pastes the message, waits for response
  5. Extracts response via network interception or DOM parsing
  6. Returns in Anthropic API format

Limitations

  • CLI mode: Requires Claude Code CLI with an active subscription. Each request spawns a new process.
  • Browser mode: Requests processed one at a time (~15-30s each). System prompts prepended as text. No image support. Claude.ai UI changes may break selectors.
  • Both modes: Token counts may be estimates. Model selection maps to Claude CLI aliases (sonnet/opus/haiku).

Disclaimer: This tool may violate Anthropic's Terms of Service. Use at your own risk.

License

MIT