open-index/open-npm huggingface dataset:
npm package: @fxzer/claude-code-switch
Description: Claude Code 供应商/模型/API Keys切换CLI工具
Latest version: 1.2.2

# 🚀 ccs - AI 模型切换 CLI 工具

一个用于快速切换不同 AI 供应商和模型的命令行工具，支持直接写入 `~/.zshrc` 并自动复制生效命令到剪切板。

## ✨ 特性

- 🎯 **一键切换**：支持多个 AI 供应商（SiliconFlow、BigModel、DashScope、ModelScope、DeepSeek、MoonShot、MinMax）(可编辑配置文件添加额外供应商)
- 🤖 **多模型支持**：每个供应商支持多个模型选择
- 🔑 **多 API Key**：支持配置多个 API Key 并快速切换
- 🔍 **验证密钥**：一键验证所有 API Key 的有效性，快速识别无效密钥
- 🏪 **模型广场**：显示各供应商模型广场链接，方便挑选新模型
- ⚡️ **快速生效**：写入配置后自动复制 `source ~/.zshrc` 到剪切板
- 🎨 **友好界面**：交互式命令行界面，操作简单直观

## 🚀 快速开始

### 1. 安装

```bash
npm install @fxzer/claude-code-switch
```

### 2. 配置

首次运行会自动创建配置文件模板：

```bash
ccs
```

然后编辑 `~/.claude/ccs-providers.json` 文件，添加你的真实 API Keys：

```json
{
  "providers": {
    "siliconflow": {
      "name": "SiliconFlow",
      "baseUrl": "https://api.siliconflow.cn/",
      "modelHubUrl": "https://cloud.siliconflow.cn/me/models",
      "models": [
        "zai-org/GLM-4.6",
        "zai-org/GLM-4.5",
        "moonshotai/Kimi-K2-Instruct-0905"
      ],
     "apiKeys": [
        {
          "name": "账号 1 密钥",
          "key": "sk-xxx"
        },
        {
          "name": "账号 2 密钥",
          "key": "sk-yyy"
        }
      ]
    }
  },
  "current": {
    "provider": "siliconflow",
    "model": "zai-org/GLM-4.6",
    "apiKeyIndex": 0
  }
}
```

### 3. 使用

```bash
# 启动 CLI
ccs
```

### 4. 交互式选择
```
🤖 AI 模型切换工具
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📋 当前配置:
  供应商: 智谱 BigModel (bigmodel)
  模型:   glm-4.6
  API Key: 智谱测试账号 (c939cb...8.xx)
  Base URL: https://open.bigmodel.cn/api/anthropic
  🏪 模型广场: https://bigmodel.cn/console/modelcenter/square

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔄 切换配置:
? 请选择操作:
❯ 🏢 选择供应商
  🤖 选择模型
  🔑 选择 API Key
  ──────────────
  ✅ 写入配置并生效
  📖 查看 ~/.zshrc 配置
  🔍 验证密钥
  ❌ 退出
```

### 5. 配置生效流程
1. **选择配置**：选择供应商、模型、API Key
2. **写入配置**：选择 "✅ 写入配置并生效"
3. **自动复制**：命令自动复制 `source ~/.zshrc` 到剪切板（新开终端会自动生效，当前终端需要运行命令生效）
4. **粘贴执行**：在终端中 `Cmd+V` 粘贴执行
5. **开始使用**：运行 `claude`

## 🔧 ~/.zshrc 配置格式

配置会写入到 `~/.zshrc`，格式如下：

```bash
# AI 模型配置 - 由 ccs 命令自动生成
# ==== ccs start ====
export ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="your-api-key"
export ANTHROPIC_MODEL="glm-4.6"
# 配置时间: 2025/10/20 18:30:45
# ==== ccs end ====
```


## 🛠️ 命令选项

```bash
ccs               # 启动交互式配置
ccs --help        # 显示帮助信息
ccs --version     # 显示版本信息
```

## 🛠️ 开发

### 项目结构

```
claude-code-switch/
├── bin/
│   └── switch.js           # CLI 入口
├── lib/
│   ├── config-loader.js    # 配置加载器
│   └── env-exporter.js     # 环境变量导出器
├── ccs.template.json    # 配置模板
├── package.json
└── README.md
```

### 本地开发

```bash
# 安装依赖
npm install

# 本地测试
node bin/switch.js

# 全局安装
npm link
```
npm package: @fxzer/utils
Description: Opinionated collection of common JavaScript / TypeScript utils by @fxzer
Author: fxzer
Latest version: 0.0.2

# @fxzer/utils

[![NPM version](https://img.shields.io/npm/v/@fxzer/utils?color=a1b858&label=)](https://www.npmjs.com/package/@fxzer/utils)
[![Docs](https://img.shields.io/badge/docs-green)](https://www.jsdocs.io/package/@fxzer/utils)

Opinionated collection of common JavaScript / TypeScript utils by [@fxzer](https://github.com/fxzer).

- Tree-shakable ESM
- Fully typed - with TSDocs

> This package is designed to be used as `devDependencies` and bundled into your dist.



[MIT](./LICENSE) License © 2024-PRESENT [fxzer](https://github.com/fxzer)
npm package: @fy-/icons
Description: Social &amp; custom SVG icons for vue (optimized one path svg icons) ```   pnpm add @fy-/icons ```
Author: Florian 'Fy' Gasquez
Latest version: 0.0.2

# @fy-/icons
Social &amp; custom SVG icons for vue (optimized one path svg icons)
```
  pnpm add @fy-/icons
```

## Usage
```javascript
import { GoogleIcon } from "@fy-/icons";
```
```vue
<GoogleIcon class="w-5 h-5 text-blue-600" />
```

## Icons list
 - DiscordIcon
 - FacebookIcon
 - InstagramIcon
 - TelegramIcon
 - TwitterIcon
 - CoinMarketCapIcon
 - GoogleIcon
 - LinkedInIcon
 - OpenSeaIcon
 - RedditIcon
 - TiktokIcon
 - VkIcon
 - YoutubeIcon
 - NobemIcon
 - GithubIcon
npm package: @fy-/w3
Description: Web3 utilities for Vue3. ```   pnpm add @fy-/w3 ```
Author: Florian 'Fy' Gasquez
Latest version: 0.0.6

# @fy-/w3
Web3 utilities for Vue3.
```
  pnpm add @fy-/w3
```

## Usage
(in this example, ClientOnly is provided by @fy-/core)
```vue
<script setup>
import { Web3Connect } from '@fy-/w3';
</script>
<template>
  <div>
    <ClientOnly>
      <Web3Connect force-chain-by-name="polygon" />
    </ClientOnly>
  </div>
</template>
```
npm package: @fy-dev/builder-plugin-swc
Description: SWC plugin for builder in Modern.js
Latest version: 2.27.0


<p align="center">
  <a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
</p>
<p align="center">
  Modern.js Builder
  <br/>
  <a href="https://modernjs.dev/builder/en" target="blank">
    modernjs.dev/builder
  </a>
</p>
<p align="center">
  A build engine for web development.
</p>

# @modern-js/builder-plugin-swc

This package is the swc plugin of Modern.js Builder.

## Getting Started

- [Documentation](https://modernjs.dev/builder/en/plugins/plugin-swc.html)

## Contributing

- [Contributing Guide](https://github.com/web-infra-dev/modern.js/blob/main/CONTRIBUTING.md)
npm package: @fy-dev/core-rspack
Description: Storybook framework-agnostic API
Latest version: 7.0.0-rc.12

# Storybook Core-Common

Common utilities used across `@storybook/core-server` (manager UI configuration) and `@fy-dev/builder-rspack` (preview configuration).

This is a lot of code extracted for convenience, not because it made sense.
npm package: @fy-dev/preset-react-rspack
Description: Storybook for React: Develop React Component in isolation with Hot Reloading.
Latest version: 7.0.0-rc.16

# Storybook Rspack preset for React

This package is a [preset](https://storybook.js.org/docs/react/addons/writing-presets#presets-api) that configures Storybook's rspack settings for handling React.
It's an internal package that's not intended to be used directly by users.

- More info on [Storybook for React](https://storybook.js.org/docs/react/get-started/introduction)
npm package: @fy-dev/react-rspack
Description: Storybook for React: Develop React Component in isolation with Hot Reloading.
Latest version: 7.0.0-rc.16

# Storybook for React

Storybook for React is a UI development environment for your React components.
With it, you can visualize different states of your UI components and develop them interactively.

![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif)

Storybook runs outside of your app.
So you can develop UI components in isolation without worrying about app specific dependencies and requirements.

## Getting Started

```sh
cd my-react-app
npx storybook init
```

For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/react/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.

Here are some featured storybooks that you can reference to see how Storybook works:

- [Demo of Storybook Design System](https://storybook.js.org/design-system) - [source](https://github.com/storybookjs/design-system)

## Create React App

Support for [Create React App](https://create-react-app.dev/) is handled by [`@storybook/preset-create-react-app`](https://github.com/storybookjs/presets/tree/master/packages/preset-create-react-app).

This preset enables support for all Create React App features, including Sass/SCSS and TypeScript.

If you're working on an app that was initialized manually (i.e., without the use of Create React App), ensure that your app has [react-dom](https://www.npmjs.com/package/react-dom) included as a dependency. Failing to do so can lead to unforeseen issues with Storybook and your project.

## Typescript

`@storybook/react` is now exporting its own types to use with Typescript.
You don't need to have `@types/storybook__react` installed anymore if it was your case.
But you probably also need to use types from `@types/node @types/react`.

## Docs

- [Basics](https://storybook.js.org/docs/react/get-started/introduction)
- [Configurations](https://storybook.js.org/docs/react/configure/overview)
- [Addons](https://storybook.js.org/docs/react/configure/storybook-addons)