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

@cc-switch/cli

v1.0.0

Published

Claude Code provider switcher - manage multiple AI providers

Readme

CC-Switch

Claude Code 提供商管理器 - 轻松切换多个 AI 服务提供商的环境变量。

安装

npm install -g @yams/cc-switch

安装脚本会自动:

  • 检测你的 shell(bash/zsh)
  • ~/.bashrc~/.zshrc 中添加配置
  • 显示后续步骤提示

安装完成后,运行以下命令使更改生效:

source ~/.bashrc   # 或 source ~/.zshrc
# 或重新打开终端

快速开始

# 1. 配置 shell
cc-switch setup

# 2. 创建新配置(会打开编辑器)
cc-switch new zhipu

# 3. 切换提供商
cc-switch switch zhipu

# 4. 重新加载环境变量
eval $(cc-switch export)

使用

# 列出所有配置
cc-switch list

# 创建新配置(会打开编辑器)
cc-switch new deepseek

# 编辑现有配置(会打开编辑器)
cc-switch edit zhipu

# 切换配置
cc-switch switch kimi

# 重新加载环境变量(切换后需要)
eval $(cc-switch export)

# 查看配置详情
cc-switch show zhipu

# 删除配置
cc-switch remove kimi

# 查看当前状态
cc-switch status

# 重新配置 shell(如需要)
cc-switch setup

关于环境变量

切换配置后,需要重新加载环境变量才能生效:

# 方式 1: 使用 export 命令(推荐)
eval $(cc-switch export)

# 方式 2: 重新加载 shell 配置
source ~/.bashrc    # 或 source ~/.zshrc

# 方式 3: 重启 shell
exec $SHELL

# 方式 4: 重新打开终端

配置文件格式

每个配置是一个 JSON 文件,只包含提供商相关的环境变量:

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your-token-here",
    "ANTHROPIC_BASE_URL": "https://api.example.com",
    "ANTHROPIC_MODEL": "model-name",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "haiku-model",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "opus-model",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "sonnet-model"
  }
}

配置文件位置

~/.config/cc-switch/
├── config.json          # 当前激活的配置
├── providers/
│   ├── zhipu.json       # 智谱配置
│   └── kimi.json        # Kimi 配置
└── active.json          # 当前激活的配置(副本)

编辑器

使用 EDITOR 环境变量指定编辑器:

export EDITOR=vim
# 或
export EDITOR=code

卸载

npm uninstall -g @yams/cc-switch

然后手动删除 ~/.bashrc~/.zshrc 中的 cc-switch 配置行。

注意

CC-Switch 只管理提供商相关的环境变量,不涉及其他 Claude Code 配置(如插件、钩子等)。

License

MIT