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

v0.5.0

Published

TUI for managing Claude Code model configurations

Downloads

657

Readme

cc-hub

一个终端 TUI 工具,用于管理 Claude Code 的模型配置。无需手动编辑配置文件,即可在不同 LLM 提供商和模型之间切换。

功能

  • 一键切换当前使用的模型
  • 支持全局/本地作用域切换(Tab 键)
  • 管理多个提供商和模型
  • 将 Claude Code 的角色别名(opus/sonnet/haiku/subagent)映射到任意模型
  • 原子写入配置,防止文件损坏
  • 配置文件支持 JSON5(可写注释)

演示

cc-hub 演示

安装

npm install -g cc-hub

或者不安装直接运行:

npx cc-hub

使用

启动 TUI:

cc-hub

快捷键

| 按键 | 操作 | |------|------| | | 导航模型列表 | | Enter | 切换到选中的模型 | | Tab | 切换全局/本地作用域 | | d | 删除选中的模型 | | s | 场景别名映射 | | q | 退出 |

作用域

Tab全局本地 作用域之间切换:

  • 全局 — 写入 ~/.claude/settings.json(影响所有项目)
  • 本地 — 写入当前项目目录下的 .claude/settings.local.json(仅影响当前项目)

场景映射

s 将 Claude Code 内置别名映射到你的模型:

| 别名 | 环境变量 | |------|---------| | Opus | ANTHROPIC_DEFAULT_OPUS_MODEL | | Sonnet | ANTHROPIC_DEFAULT_SONNET_MODEL | | Haiku | ANTHROPIC_DEFAULT_HAIKU_MODEL | | Subagent | CLAUDE_CODE_SUBAGENT_MODEL |

配置

编辑 ~/.cc-hub/config.json 添加提供商:

{
  "providers": [
    {
      "id": "dashscope",
      "name": "DashScope",
      "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
      "apiKey": "sk-your-api-key",
      "models": ["qwen3.6-plus", "qwen-max"]
    },
    {
      "id": "deepseek",
      "name": "DeepSeek",
      "baseUrl": "https://api.deepseek.com/v1",
      "apiKey": "sk-your-api-key",
      "models": ["deepseek-chat", "deepseek-reasoner"]
    }
  ]
}

选中模型后,cc-hub 会将提供商的凭证和模型 ID 写入 Claude 的配置文件(全局或本地,取决于当前作用域)。需要重启 Claude Code 才能生效。

开发

pnpm run dev        # 构建并运行
pnpm run dev:watch  # 监听文件变更自动重建

许可证

MIT