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

claude-code-model-switcher

v2.1.0

Published

Interactive model selector for Claude Code

Readme

Claude Code Model Switcher

交互式 Claude Code 模型选择器,支持多供应商配置。

安装

从 npm 安装(推荐)

npm install -g claude-code-model-switcher

从 GitHub 安装

git clone https://github.com/whereayan/claude-code-model-switcher.git
cd claude-code-model-switcher
npm link

本地开发

git clone https://github.com/whereayan/claude-code-model-switcher.git
cd claude-code-model-switcher
npm install
npm link

卸载

卸载 npm 全局安装

npm uninstall -g claude-code-model-switcher

卸载本地链接

# 进入项目目录
cd claude-code-model-switcher
npm unlink

清理配置文件(可选)

卸载后配置文件会保留,如需完全清理:

# Windows
rmdir /s "%USERPROFILE%\.claude-model-launcher"

# macOS/Linux
rm -rf ~/.claude-model-launcher

使用

交互模式

ccms                    # 选择一个模型,所有类型使用相同模型
ccms --multi            # 分别为 Default/Opus/Sonnet/Haiku 选择模型

命令行模式

ccms qwen3.5-plus                          # 直接指定模型(所有类型相同)
ccms --opus gpt-4                          # 只设置 Opus 模型
ccms --sonnet gpt-3.5-turbo                # 只设置 Sonnet 模型
ccms --haiku glm-5                         # 只设置 Haiku 模型
ccms --model qwen3-max                     # 只设置默认模型
ccms --opus gpt-4 --sonnet gpt-3.5-turbo   # 组合设置多个模型

其他命令

ccms --version         # 查看版本
ccms --help            # 查看帮助

操作说明

交互模式下:

  • ↑/↓ 方向键:选择模型
  • Enter:确认选择
  • Esc:退出

环境变量

ccms 会设置以下环境变量:

| 环境变量 | 说明 | |---------|------| | ANTHROPIC_MODEL | 默认模型 | | ANTHROPIC_DEFAULT_OPUS_MODEL | Opus 模型 | | ANTHROPIC_DEFAULT_SONNET_MODEL | Sonnet 模型 | | ANTHROPIC_DEFAULT_HAIKU_MODEL | Haiku 模型 | | ANTHROPIC_BASE_URL | API 基础地址 | | ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN | 认证密钥 |

配置

配置文件位置:~/.claude-model-launcher/config.json

  • Windows: C:\Users\你的用户名\.claude-model-launcher\config.json
  • macOS/Linux: ~/.claude-model-launcher/config.json

首次运行会自动创建默认配置文件。

配置示例

{
  "defaultSupplierId": "aliyuncs",
  "suppliers": [
    {
      "id": "aliyuncs",
      "label": "aliyuncs",
      "baseUrl": "https://dashscope.aliyuncs.com/apps/anthropic",
      "authType": "ANTHROPIC_API_KEY",
      "apiKey": "your-api-key-here",
      "models": [
        "qwen3.5-plus",
        "glm-5",
        "kimi-k2.5",
        "qwen3-max"
      ]
    },
    {
      "id": "custom-provider",
      "label": "Custom Provider",
      "baseUrl": "https://api.custom-provider.com/v1",
      "authType": "ANTHROPIC_AUTH_TOKEN",
      "apiKey": "your-auth-token-here",
      "models": [
        "model-1",
        "model-2"
      ]
    }
  ]
}

配置说明

| 字段 | 说明 | |------|------| | defaultSupplierId | 默认供应商 ID(可选) | | suppliers | 供应商列表 | | suppliers[].id | 供应商唯一标识 | | suppliers[].label | 供应商显示名称 | | suppliers[].baseUrl | API 基础地址 | | suppliers[].authType | 认证类型:ANTHROPIC_API_KEYANTHROPIC_AUTH_TOKEN(默认 ANTHROPIC_API_KEY) | | suppliers[].apiKey | API 密钥或 Token | | suppliers[].models | 可用模型列表 |

authType 说明

| 值 | 适用场景 | |-----|---------| | ANTHROPIC_API_KEY | 直接使用 Anthropic API 或大多数第三方代理(默认) | | ANTHROPIC_AUTH_TOKEN | 使用 OAuth Token 或特定平台认证 |

License

MIT