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-api/cli

v1.2.5

Published

非官方 API 协议适配网关 CLI(Unofficial)

Readme

@cc-api/cli

API 协议适配网关 CLI —— 将上游 API 转换为 Anthropic / OpenAI 兼容格式,让 AI 编程工具直接对接。

非官方工具,目前主要适配 Claude Code,其他平台工具调用暂未适配。仅适合拥有 comate 企业版订阅的用户使用,需自行提供有效 API 凭证。 建议使用 >= 1.2.5 版本,早期版本存在 bin 路径问题、转发失败问题、agents view 中断问题。

安装

# npm
npm install -g @cc-api/cli

运行需要 Bun >= 1.0.0

快速开始

# 1. 可视化配置 API Key 及相关参数
cc-api web

# 2. 配置 AI 编程工具使用 cc-api
cc-api setup

# 3. 启动代理服务器
cc-api start

命令

cc-api web

启动可视化配置管理界面,在浏览器中配置 API Key 等参数。

cc-api web              # 启动并自动打开浏览器(默认端口 8765)
cc-api web --port 9000  # 指定端口
cc-api web --no-open    # 不自动打开浏览器

cc-api setup

一键配置 AI 编程工具使用 cc-api。

cc-api setup                        # 使用默认配置
cc-api setup --port 8080            # 指定服务端口
cc-api setup --url http://localhost:8080  # 指定服务地址
cc-api setup --key sk-cc-api-xxx    # 指定 API Key

cc-api start

启动代理服务器,默认端口 1234

cc-api start              # 使用默认端口
cc-api start --port 8080  # 指定端口

cc-api keys

管理 API Key(用于鉴权)。

cc-api keys list                          # 列出所有 Key
cc-api keys add                           # 交互式添加 Key
cc-api keys add --loginName my-account    # 指定 loginName 添加
cc-api keys remove sk-cc-api-abc          # 删除 Key(前缀匹配)

Key 存储在 ~/.cc-api/api-keys.json,格式为 sk-cc-api- 前缀的随机字符串。

cc-api models

列出当前可用的模型。

cc-api models

cc-api config

查看和修改配置项。

cc-api config show                # 显示所有配置
cc-api config set port 8080       # 修改端口
cc-api config set debugLog true   # 开启调试日志

配置项可通过环境变量覆盖,优先级:环境变量 > settings.json > 默认值。

环境变量

| 变量 | 说明 | 默认值 | |------|------|--------| | API_BASE_URL | 上游 API 地址 | - | | API_KEY | 上游 API Key | - | | DEVICE_ID | 设备 ID | - | | PORT | 代理服务端口 | 1234 |

| UPSTREAM_IDLE_TIMEOUT_MS | 上游 SSE 空闲超时(毫秒) | 300000 |

更新日志

1.2.5

  • 修复 Claude Code agents view 中断问题:同一客户端的不同会话(子代理)请求不再互相 abort(streamKey 加入 conversationId 隔离)
  • 提高空闲超时:上游 SSE 空闲超时从 120s 提高到 300s,避免后台长时间任务被误判超时中断
  • 新增 UPSTREAM_IDLE_TIMEOUT_MS 环境变量,可自定义空闲超时

免责声明本项目为非官方第三方工具,与 comate 无任何关联。仅限拥有合法 comate 企业版订阅的用户使用,需自行提供有效的 API 凭证。使用者应遵守 comate 的服务条款,因使用本工具产生的任何问题由使用者自行承担。

License

MIT