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

api-switch-cc

v1.0.0

Published

Claude Code 多模型代理 — 一���切换 DeepSeek、Qwen、GLM、商汤商量、NVIDIA 等国产大模型,协议自动转换,零配置即用。安全增强版:API Key 加密存储、Bearer 认证、SHA256 验证、速率限制、TLS 支持。LLM API proxy for Claude Code with security hardening.

Readme

api-switch-cc

Claude Code 多模型代理 — 一键切换 DeepSeek、Qwen、GLM、SenseNova、NVIDIA 等大模型。协议自动转换,零配置即用。 LLM API proxy for Claude Code — route to DeepSeek, Qwen, GLM, SenseNova, NVIDIA and more with automatic protocol conversion.

npm install -g api-switch-cc

api-switch setup deepseek --key sk-xxx
api-switch provider known              # 查看 13 个内置厂商
api-switch use deepseek-chat
api-switch serve

Usage

# Install globally
npm install -g api-switch-cc

# Setup provider
api-switch setup deepseek --key sk-xxx

# List built-in providers (13+ supported)
api-switch provider known

# Activate model
api-switch use deepseek-chat

# Start proxy
api-switch serve

# Check version (should match package version)
api-switch version

版本管理说明: api-switch versionapi-switch update 现在使用 semver 向前兼容比对。如果通过 api-switch update 升级了二进制,npm 包装器不会将其回退到旧版本(v0.9.3+)。

Or run directly

npx api-switch-cc setup agnes --key sk-xxx npx api-switch-cc serve


## Features

- **13 built-in provider presets** — DeepSeek, Qwen, GLM, SenseNova (商汤), NVIDIA (英伟达), Moonshot, Agnes AI (free), Kimi, Yi, StepFun, ERNIE, Hunyuan, APIFree
- **Security hardening** — Encrypted API key storage (AES-256-GCM), Bearer token auth, rate limiting, TLS support
- **Auto sync settings.json** — serve startup automatically syncs Claude Code base URL
- **Port persistence** — `serve -p <port>` saves to config; `--no-save-port` to skip
- **Auto-update with verification** — checks for new versions, SHA256 checksum validation
- **Graceful shutdown** — SIGINT/SIGTERM signal handling
- **Protocol conversion** — Anthropic ↔ OpenAI bidirectional (SSE streaming, tool calls, multimodal images)
- **Multimodal support** — Full image conversion (base64 and URL) for Vision models
- **DeepSeek compatible** — auto-strips orphaned tool_calls for strict providers
- **Hot-reload config** — changes take effect without restart
- **Web dashboard** — real-time request monitoring at `/admin/` (localhost only)
- **Usage tracking** — daily token statistics with cache hit rates
- **Context retention** — tested across all configured models

## Quick Start

```bash
# 1. Install
npm install -g api-switch-cc

# 2. See available providers
api-switch provider known

# 3. Add a provider
api-switch provider add deepseek --key sk-xxx

# 4. Import models
api-switch model import deepseek

# 5. Switch model & start
api-switch use deepseek-chat
api-switch serve               # default :8080, auto-syncs settings.json

Commands

| Command | Description | |---------|-------------| | api-switch serve | Start proxy (default :8080) | | api-switch serve -p 9000 | Start on custom port, persist to config | | api-switch use <model> | Switch active model in Claude Code | | api-switch provider known | List 13 built-in providers | | api-switch provider list | List configured providers | | api-switch provider add | Add provider (supports presets) | | api-switch doctor | Run diagnostics | | api-switch monitor | View real-time traffic | | api-switch usage | Token usage statistics | | api-switch update | Update to latest version |

Security Configuration

# ~/.api-switch.yaml
server:
  port: 8080
  auth_token: ""      # Set to require Bearer authentication
  rate_limit: 100     # Requests per minute per IP (0 = disabled)
  tls_cert: ""        # TLS certificate path (optional)
  tls_key: ""         # TLS key path (optional)

Security features:

  • Encrypted API keys — Stored with AES-256-GCM, auto-migrates from plaintext
  • Bearer authentication — Set auth_token to require Authorization: Bearer <token>
  • Rate limiting — Protect against DoS abuse
  • TLS/HTTPS — Enable encrypted communication
  • Update verification — SHA256 checksum validation for auto-updates

See the full documentation on GitHub.

Supported platforms

  • Linux (amd64, arm64)
  • macOS (amd64, arm64)
  • Windows (amd64)