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

v0.4.0

Published

轻量级 Claude Code 项目级 API 配置切换工具 — 零依赖臃肿,秒级切换,交互式 TUI

Readme

cc-switch-config


为什么选择 cc-config?

你需要在多个项目之间切换 Claude Code 的 API 提供商——团队项目用 Anthropic API,个人项目用自定义端点,客户项目用转发服务。每次手动改 settings.json?太烦了。

cc-switch-config 是这个痛点的最简解。

| 特性 | 说明 | |------|------| | ⚡ 秒级切换 | 一条命令切换整个项目的 API 配置,无需手动编辑文件 | | 🪶 极简轻量 | 包体积仅 135 KB,无臃肿依赖树 | | 🎨 交互式 TUI | 精美的终端仪表盘,支持模糊搜索、diff 预览、向导式操作 | | 🔒 安全第一 | API Key 密码式输入、脱敏显示、永不写入日志 | | 💾 自动备份 | 每次变更前自动创建备份,一条命令回滚 | | 📦 配置复用 | 一次创建提供商模板,在任意项目中复用 | | 🔗 Shell 钩子 | 进入项目目录自动切换配置,无感知 |

快速开始

# 安装
npm install -g cc-switch-config

# 启动 TUI 仪表盘
cc-config

# 快速切换当前项目到 my-profile
cc-config my-profile

# 列出所有注册项目
cc-config list

CLI 命令速览

cc-config                   # 启动交互式 TUI 仪表盘
cc-config <profile-name>    # 快速切换当前项目配置

# 配置管理
cc-config config add        # 创建配置(统一模式/独立模式)
cc-config config list       # 列出所有配置模板
cc-config config remove     # 删除配置

# 项目管理
cc-config list              # 列出已注册项目
cc-config register <path>   # 注册新项目
cc-config switch <p> <cfg>  # 为项目应用配置
cc-config current [--json]  # 查看当前项目配置

# 其他
cc-config undo              # 撤销上次变更
cc-config export [--stdout] # 导出配置为 JSON
cc-config scan [--root]     # 扫描目录发现项目

工作原理

~/.config/cc-config/
  templates.json            ← 提供商模板(API Key + Base URL + 模型)

<your-project>/.claude/
  settings.json             ← cc-config switch → 精确替换 env/model 字段
  settings.local.json       ← 本地覆盖(优先)

~/.local/share/cc-config/
  projects.json             ← 已注册项目索引
  backups/                  ← 自动备份,cc-config undo 恢复

核心原则:只修改 envmodel 字段,保留 permissionshooksmcpServers 等非 API 配置不变。

文档

| 文档 | 说明 | |------|------| | 使用指南 | 完整 CLI 命令参考、TUI 操作、场景示例 | | 开发指南 | 架构设计、本地开发、测试、贡献 | | 变更日志 | 版本历史与变更记录 |

许可证

MIT

贡献

欢迎贡献!请先阅读 DEVELOPMENT.md 了解本地开发配置。