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

spectyra-proxy

v1.0.1

Published

Local proxy for Spectyra optimization - works with Copilot, Cursor, Claude Code, and other coding assistants

Readme

Spectyra Proxy

Local proxy server that provides an OpenAI-compatible endpoint, routing requests through Spectyra for automatic optimization. Works with GitHub Copilot, Cursor, Claude Code, and other coding assistants.

Features

  • OpenAI-compatible API - Works with any tool that uses OpenAI API
  • Automatic optimization - Routes through Spectyra for 40-65% token savings
  • Real-time dashboard - Web UI showing savings and stats
  • Configuration management - Easy setup via web dashboard
  • BYOK support - Use your own API keys
  • Multi-provider support - OpenAI, Anthropic, Gemini, Grok

Installation

Install via npm (Recommended)

npm install -g spectyra-proxy

Then start with:

spectyra-proxy

Note: The npm package contains only compiled JavaScript, not source code. Your code remains private.

Option 2: Install from Source (Development)

If you need to modify the code or the npm package isn't available:

Quick Start

  1. Start the proxy:

    If installed via npm:

    spectyra-proxy
  2. Configure via dashboard:

    • Open http://localhost:3002 in your browser
    • Enter your Spectyra API key
    • Enter your provider API key (OpenAI, Anthropic, etc.)
    • Select provider and optimization settings
    • Click "Save Configuration"
  3. Configure your coding tool:

    • Set OPENAI_API_BASE=http://localhost:3001/v1
    • Or configure in your tool's settings

Usage

With GitHub Copilot

  1. Set environment variable:
export OPENAI_API_BASE=http://localhost:3001/v1
  1. Restart VS Code/Copilot

With Cursor

  1. Open Cursor Settings
  2. Set API base URL to: http://localhost:3001/v1
  3. Restart Cursor

With Claude Code

  1. Configure Claude Code to use custom API endpoint
  2. Set endpoint to: http://localhost:3001/v1

Dashboard

Access the dashboard at: http://localhost:3002

Features:

  • Real-time savings statistics
  • Recent request history
  • Configuration management
  • Live updates every 2 seconds

Configuration

Environment Variables

  • PROXY_PORT - Proxy server port (default: 3001)
  • DASHBOARD_PORT - Dashboard port (default: 3002)
  • SPECTYRA_API_URL - Spectyra API URL (default: https://spectyra.up.railway.app/v1)

Configuration File

Configuration is saved to .spectyra-proxy-config.json in the proxy directory.

Fields:

  • spectyraKey - Your Spectyra API key
  • providerKey - Your provider API key (BYOK)
  • provider - Provider name (openai, anthropic, gemini, grok)
  • path - Optimization path (code, talk)
  • optimizationLevel - Optimization level (0-4)

API Endpoints

Proxy Endpoint

  • POST /v1/chat/completions - OpenAI-compatible chat endpoint
  • POST /v1/messages - Anthropic-compatible messages endpoint

Configuration

  • GET /config - Get current configuration (without keys)
  • POST /config - Update configuration

Statistics

  • GET /stats - Get usage statistics and savings

Health Check

  • GET /health - Check proxy status

How It Works

Your Coding Tool (Copilot/Cursor/etc)
  → Local Proxy (localhost:3001)
    → Spectyra API (optimization)
      → Provider API (OpenAI/Anthropic)
        → Optimized Response
          → Your Tool

Benefits:

  • Transparent optimization
  • No code changes needed
  • Real-time savings tracking
  • Works with any OpenAI-compatible tool

Troubleshooting

Proxy not starting

  • Check if ports 3001 and 3002 are available
  • Try different ports via environment variables

Configuration not saving

  • Check file permissions in proxy directory
  • Ensure .spectyra-proxy-config.json is writable

Tool not connecting

  • Verify proxy is running: curl http://localhost:3001/health
  • Check tool's API base URL setting
  • Ensure tool supports custom API endpoints

No savings showing

  • Verify configuration is correct
  • Check Spectyra API key is valid
  • Check provider API key is valid
  • Look at proxy console for errors

Development

# Watch mode (auto-restart on changes)
npm run dev

# Build for distribution
npm run build

License

MIT