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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@otdrfu/cck

v0.6.0

Published

Claude Code Key Manager - Seamlessly manage multiple Anthropic API keys and launch Claude CLI

Readme

CCK - Claude Code Key Manager

English | 中文

轻松管理多个 Anthropic API 密钥并启动 Claude CLI。

特性

  • 🔐 安全的密钥管理 - 安全存储多个 API 密钥
  • 🎯 智能选择 - 使用 fzf 或备用 UI 进行交互式密钥选择

安装

npm install -g @otdrfu/cck

或使用 pnpm:

pnpm add -g @otdrfu/cck

快速开始

# 添加你的第一个 API 密钥
cck add

# 启动 Claude CLI(交互式密钥选择)
cck

# 列出所有密钥
cck list

使用说明

密钥管理命令

# 列出所有 API 密钥
cck list
cck ls
cck list -f               # 显示完整密钥

# 查看指定密钥详情
cck show <key-name>
cck show <key-name> -f    # 显示完整密钥

# 添加新的 API 密钥
cck add

# 编辑 API 密钥
cck edit <key-name>

# 重命名密钥
cck rename <old-name> <new-name>

# 删除 API 密钥
cck remove <key-name>
cck rm <key-name>

# 复制密钥到剪贴板
cck copy <key-name>
cck cp <key-name>

# 显示当前默认密钥
cck current

# 切换默认密钥
cck use <key-name>

# 导出所有密钥到文件
cck export backup.json

# 从文件导入密钥
cck import backup.json           # 跳过已存在的密钥
cck import backup.json -o        # 覆盖已存在的密钥

# 显示帮助
cck help

Web UI(可选)

Web UI 是一个可选功能,首次使用需要安装依赖。运行时会提示你是否安装(约需 2-3 分钟)。

# 启动 Web 管理界面(首次运行会提示安装)
cck web

# 或先手动安装
cck web --install

# 指定端口
cck web --port 8080

# 不自动打开浏览器
cck web --no-open

注意:Web UI 文件会安装到 ~/.cck/web。你可以在提示时选择跳过,之后通过 cck web --install 手动安装。

Web UI 提供以下功能:

  • 📋 密钥列表展示(卡片式布局)
  • ➕ 添加/编辑/删除密钥
  • 🔍 搜索过滤
  • ✅ 密钥有效性验证
  • 📤 导入/导出
  • 🌙 深色模式支持
  • 🌍 语言切换(中/英)

启动 Claude CLI

# 交互式密钥选择
cck

# 使用默认密钥
cck --use-default

# 使用指定密钥
cck --key <key-name>

# 传递参数给 Claude CLI
cck -r                    # 重置会话
cck --verbose             # 详细输出
cck -r --verbose          # 组合参数

# 混合 CCK 和 Claude 选项
cck --key prod -r --verbose

配置

创建 ~/.cckrc 文件来自定义行为:

{
  "version": "1.0.0",
  "keysFile": "~/.cck/keys.json",
  "cacheFile": "~/.cck/cache",
  "logLevel": "info",
  "selector": {
    "type": "fzf",
    "fallback": "builtin"
  },
  "display": {
    "colorEnabled": true
  }
}

开发

# 克隆仓库
git clone https://github.com/todrfu/claude-code-key-manager.git
cd claude-code-key-manager

# 安装依赖
npm install
cd web && npm install && cd ..

# 构建
npm run build:all

# 运行测试
npm test

# 开发模式
npm run dev

发布

# 补丁版本发布 (0.5.0 -> 0.5.1)
npm run release:patch

# 次版本发布 (0.5.0 -> 0.6.0)
npm run release:minor

# 主版本发布 (0.5.0 -> 1.0.0)
npm run release:major

许可证

MIT © todrfu

贡献

欢迎贡献!提交 PR 前请阅读 CONTRIBUTING.md

更新日志

查看 CHANGELOG.md 了解版本历史。