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-ccs

v0.13.1

Published

切换Claude Code的Provider配置的CLI工具

Readme

CCS - Claude Config Switcher

English | 简体中文

快速切换 Claude Code 项目的 AI Provider 配置,告别手动编辑配置文件。

安装

npm install -g claude-ccs

要求:Claude Code >= v2.0.1(用 claude --version 检查)

快速开始

首次运行自动初始化:

  • 创建默认配置
  • 从 shell 环境变量导入配置
  • 安装 Tab 补全

编辑配置添加你的 Provider:

ccs config

配置示例:

{
  "profiles": {
    "anthropic": {
      "ANTHROPIC_BASE_URL": "https://api.anthropic.com",
      "ANTHROPIC_AUTH_TOKEN": "sk-ant-xxx"
    },
    "custom-gateway": {
      "ANTHROPIC_BASE_URL": "https://your-gateway.example.com/v1",
      "ANTHROPIC_AUTH_TOKEN": "your-token-here",
      "ANTHROPIC_MODEL": "claude-sonnet-4-6"
    }
  }
}

在项目目录切换 Provider:

ccs

常用命令

| 命令 | 说明 | |------|------| | ccs | 切换 Provider | | ccs config | 编辑配置 | | ccs config sync-env | 从 shell 环境变量同步 | | ccs status | 查看当前配置 | | ccs status --shell | 查看 Shell 集成状态 | | ccs setup | 设置 Shell 集成(自动在 claude 命令前运行 ccs) | | ccs teardown | 移除 Shell 集成 | | ccs -v, --version | 查看版本号 | | ccs project list | 列出已注册项目 | | ccs completion install | 安装 Shell 补全 |

注意ccs installccs uninstall 已废弃,请使用 ccs setupccs teardown 代替。旧命令在 v1.0.0 版本将被移除。

配置文件

位于 ~/.ccs/ 目录:

  • config.json — Provider 配置
  • projects.json — 已注册项目(自动管理)

Shell 环境变量

CCS 支持从 ~/.zshrc~/.bashrc 自动导入:

export ANTHROPIC_BASE_URL="https://api.anthropic.com"
export ANTHROPIC_AUTH_TOKEN="sk-ant-xxx"
export ANTHROPIC_MODEL="claude-sonnet-4-6"

工作原理

CCS 修改项目的 .claude/settings.local.json,优先级高于 shell 环境变量。切换后需重启 Claude Code 或 VS Code / Cursor 中的 Claude Code 插件 后生效。

Shell 集成(推荐)

通过 Shell 集成,可以在启动 Claude Code 前自动运行 ccs 选择 Provider,无需手动切换。

设置 Shell 集成

ccs setup

设置后,在项目目录中输入 claude 命令时会自动提示选择 Provider:

cd /path/to/your/project
claude
# 🔧 检测到项目,选择 Provider 配置...
# ? 选择 Provider 配置: (Use arrow keys)
# ❯ anthropic
#   custom-gateway

工作原理

Shell 集成会在你的 shell 配置文件(~/.zshrc~/.bashrc)中添加一个 claude 函数:

  • 在项目目录中:自动运行 ccs 选择 Provider,然后启动 Claude Code
  • 在非项目目录中:直接启动 Claude Code

移除 Shell 集成

ccs teardown

查看集成状态

ccs status --shell

License

MIT


CCS - Claude Config Switcher (English)

Quickly switch the AI Provider configuration for Claude Code projects — no more manual config editing.

Install

npm install -g claude-ccs

Requires: Claude Code >= v2.0.1 (check with claude --version)

Quick Start

Run ccs for the first time and it auto-initializes:

  • Creates the default config
  • Imports settings from your shell environment variables
  • Installs Tab completion

Edit the config to add your providers:

ccs config

Config example:

{
  "profiles": {
    "anthropic": {
      "ANTHROPIC_BASE_URL": "https://api.anthropic.com",
      "ANTHROPIC_AUTH_TOKEN": "sk-ant-xxx"
    },
    "custom-gateway": {
      "ANTHROPIC_BASE_URL": "https://your-gateway.example.com/v1",
      "ANTHROPIC_AUTH_TOKEN": "your-token-here",
      "ANTHROPIC_MODEL": "claude-sonnet-4-6"
    }
  }
}

Switch provider in a project directory:

ccs

Commands

| Command | Description | |---------|-------------| | ccs | Switch provider | | ccs config | Edit config | | ccs config sync-env | Sync from shell environment variables | | ccs status | Show current config | | ccs status --shell | Show shell integration status | | ccs setup | Set up shell integration (runs ccs before claude) | | ccs teardown | Remove shell integration | | ccs -v, --version | Show version | | ccs project list | List registered projects | | ccs completion install | Install shell completion |

Note: ccs install and ccs uninstall are deprecated; use ccs setup and ccs teardown instead. The old commands will be removed in v1.0.0.

Config Files

Located in ~/.ccs/:

  • config.json — provider profiles
  • projects.json — registered projects (auto-managed)

Shell Environment Variables

CCS can import from ~/.zshrc or ~/.bashrc:

export ANTHROPIC_BASE_URL="https://api.anthropic.com"
export ANTHROPIC_AUTH_TOKEN="sk-ant-xxx"
export ANTHROPIC_MODEL="claude-sonnet-4-6"

How It Works

CCS modifies the project's .claude/settings.local.json, which takes precedence over shell environment variables. After switching, restart Claude Code (or the Claude Code extension in VS Code / Cursor) for it to take effect.

Shell Integration (Recommended)

With shell integration, ccs runs automatically before Claude Code starts, prompting you to pick a provider — no manual switching needed.

Set up

ccs setup

After setup, typing claude inside a project directory prompts you to pick a provider:

cd /path/to/your/project
claude
# 🔧 Project detected, pick a provider config...
# ? Select provider config: (Use arrow keys)
# ❯ anthropic
#   custom-gateway

How it works

Shell integration adds a claude function to your shell config (~/.zshrc or ~/.bashrc):

  • Inside a project directory: runs ccs to pick a provider, then launches Claude Code
  • Outside a project directory: launches Claude Code directly

Remove

ccs teardown

Check status

ccs status --shell

License (English)

MIT