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

claudeflare-proxy

v1.0.1

Published

OpenAI API proxy with internet search capabilities and conversation tracking

Readme

Claudeflare Proxy

A lightweight proxy server for OpenAI's API with optional internet search capabilities via Tavily integration.

🤔 Are you tired of Claude saying "I don't have access to real-time information" or going in circles trying to help you? Well, this proxy gives Claude (via OpenAI's API) the power to search the internet! No more "I should note that my knowledge cutoff is..." or watching Claude apologetically explain why it can't check current events. Now it can actually look things up instead of doing that thing where it rewrites the same response three different ways hoping one of them helps. You know what we're talking about. 🔄

Features

  • 🔄 Drop-in OpenAI API Replacement - Compatible with existing OpenAI clients
  • 🌐 Optional Internet Search - Enhance responses with real-time web data
  • 📊 Conversation Tracking - Built-in dashboard to view conversation history and usage stats
  • 🚀 Simple Setup - Environment-based configuration
  • 📝 Flexible Endpoints - Simplified /chat endpoint or full OpenAI compatibility
  • Performance Optimized - Selective search enhancement based on query content
  • 🎨 Real-time Dashboard - View conversations with live updates at http://localhost:3456/ui/dashboard.html

Installation

npm install -g claudeflare-proxy

Quick Start

  1. Configure environment variables

Create a .env file:

OPENAI_API_KEY=your_openai_api_key

# Optional: Enable internet search
TAVILY_API_KEY=your_tavily_api_key

# Optional: Configuration
DEFAULT_MODEL=gpt-4o
PORT=3456
  1. Start the server
claudeflare
  1. Make requests
curl -X POST http://localhost:3456/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "What is the capital of France?"}'

API Endpoints

/chat - Simplified Interface

curl -X POST http://localhost:3456/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello", "temperature": 0.7}'

Options:

  • message - User message (string)
  • model - Model to use (default: from .env)
  • temperature - Creativity level 0-2 (default: 0.7)
  • max_tokens - Response length limit
  • system - System prompt
  • search - Force search on/off (boolean)
  • format - Response format: "text" or "json"

/v1/chat/completions - OpenAI Compatible

Full compatibility with OpenAI's chat completions API.

Configuration

| Variable | Description | Default | |----------|-------------|---------| | OPENAI_API_KEY | OpenAI API key | Required | | TAVILY_API_KEY | Tavily API key for search | Optional | | DEFAULT_MODEL | Default model | gpt-4 | | PORT | Server port | 3456 | | LOG_LEVEL | Logging level | info | | ENABLE_REQUEST_LOGGING | Log requests | true | | FORCE_INTERNET_SEARCH | Force search for all models | false | | INTERNET_CAPABLE_MODELS | Models that support search | gpt-4,gpt-4-turbo,gpt-4o,gpt-3.5-turbo |

Internet Search

Search is automatically triggered when:

  1. Tavily is configured
  2. Model supports internet capabilities
  3. Query contains keywords like: "latest", "current", "today", "news", etc.

Override with "search": true/false in your request.

Examples

Force Internet Search

curl -X POST http://localhost:3456/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "What happened today?", "search": true}'

Get JSON Response

curl -X POST http://localhost:3456/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello", "format": "json"}'

Use Different Model

curl -X POST http://localhost:3456/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello", "model": "gpt-3.5-turbo"}'

Using with Claude (Anthropic)

To get the best results when using Claudeflare with Claude, add these instructions to Claude's system prompt or project knowledge:

Recommended Claude Instructions

When making OpenAI API calls, use the local Claudeflare proxy at http://localhost:3456 instead of the default OpenAI endpoint. This proxy adds internet search capabilities.

Key endpoints:
- Simple chat: POST http://localhost:3456/chat
- OpenAI-compatible: POST http://localhost:3456/v1/chat/completions

For real-time information, add "search": true to enable web search:
{
  "message": "What's the latest news about X?",
  "search": true
}

The proxy automatically detects when searches would be helpful for queries about:
- Current events and news
- Recent developments
- Real-time information
- Specific dates/times
- Latest updates

Response format options:
- Default: Plain text response
- JSON: Add "format": "json" to get structured response with usage stats

Adding to Claude Projects

  1. Create a new file in your Claude project called claudeflare-config.md
  2. Add the instructions above
  3. Claude will automatically use the proxy for OpenAI API calls
  4. The proxy's conversation tracking dashboard is available at http://localhost:3456/ui/dashboard.html

Development

git clone https://github.com/joedigiovanna/claudeflare-proxy.git
cd claudeflare-proxy
npm install
npm start

API Reference

See CHAT-EXAMPLES.md for comprehensive API documentation and examples.

License

MIT

Author

Joseph DiGiovanna [email protected]