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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cc-model-switcher

v1.0.12

Published

A simple CLI tool to switch Claude Code AI models easily

Readme

🚀 cc-switch - Claude Code模型切换器

一个简洁的Node.js CLI工具,用于快速切换Claude Code的大模型。

📦 安装

npm install -g cc-model-switcher

🎯 使用方法

安装完成后,你可以在任何路径下使用以下命令:

基本使用

cc_switch              # 使用默认Kimi模型
cc_switch deepseek     # 使用DeepSeek模型
cc_switch glm46        # 使用GLM-4.6模型
cc_switch --list       # 查看所有可用模型
cc_switch --interactive  # 交互式选择模型

简写命令

cc_switch -l           # 查看所有模型
cc_switch -i           # 交互式选择

🔧 配置

安装后会在用户主目录下创建 .models.json 配置文件:

Windows: C:\Users\用户名\.models.json macOS/Linux: ~/.models.json

添加新模型

编辑 ~/.models.json 文件,添加更多模型:

{
  "models": {
    "your_model": {
      "description": "Your custom model",
      "env": {
        "ANTHROPIC_BASE_URL": "https://api.your-model.com/anthropic",
        "ANTHROPIC_AUTH_TOKEN": "your-api-key",
        "API_TIMEOUT_MS": "600000",
        "ANTHROPIC_MODEL": "your-model-name",
        "ANTHROPIC_SMALL_FAST_MODEL": "your-model-name"
      }
    }
  }
}

📋 默认模型

| 模型名称 | 描述 | |----------|------| | kimi | Kimi AI (Moonshot) | | deepseek | DeepSeek V3.1 | | glm46 | GLM-4.6 (智谱AI) |

⚠️ Windows 注意事项

在Windows系统上使用时,请确保:

  1. Git Bash 已安装:Claude Code 需要 Git Bash 才能在 Windows 上运行
  2. 环境变量配置:如果 Git Bash 不在 PATH 中,请设置:
    set CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\usr\bin\bash.exe

🔧 常见问题

API密钥配置

  • 问题:提示需要配置API密钥
  • 解决:编辑 ~/.models.json 文件,将 ANTHROPIC_AUTH_TOKEN 替换为实际的API密钥

路径问题

  • 问题Path was not found 错误
  • 解决:使用 npx 方式启动,已修复路径解析问题

Git Bash 路径

  • 问题:找不到 bash.exe
  • 解决:安装 Git for Windows 或设置环境变量

🏗️ 开发

# 克隆项目
git clone [项目地址]
cd cc-model-switcher

# 安装依赖
npm install

# 本地测试
npm link

# 取消本地链接
npm unlink -g cc-model-switcher

🚀 发布到npm

# 登录npm
npm login

# 发布
npm publish

📄 许可证

MIT