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

ai-otel-setup

v1.0.25

Published

One-shot installer for AI CLI OpenTelemetry forwarding. Writes Claude Code, Codex CLI, and Gemini CLI telemetry config in a single npx command.

Downloads

3,296

Readme

AI CLI 上报工具

一键开通团队的 Claude Code / Codex CLI / Gemini CLI 使用数据上报。

安装

npx -y ai-otel-setup url=你的服务器地址

国内网络慢可以临时切到淘宝镜像:npm config set registry https://registry.npmmirror.com,再执行上面的命令。

兼容旧命令:npx -y cc-otel-installer url=... 仍然可用,行为完全一致。

你的服务器地址 替换成团队提供的实际地址(例如 url=10.20.30.40)。具体地址请向团队负责人索取。

装好后直接运行 claude / codex / gemini,上报会自动开始,无需任何额外配置。

参数

| 参数 | 说明 | |---|---| | url(必填) | 服务器地址。可填 IP / 域名,或完整地址。裸 IP 会按本地测试规则生成 http://IP:4317;裸域名会按生产规则生成 https://域名:24317。不能包含空格或逗号。 | | --http / http=1 | Claude Code 原生 OTel 使用 OTLP/HTTP。默认使用此模式,logs 指向 /v1/logs,metrics 指向 /v1/metrics。 | | --grpc / grpc=1 | 强制 Claude Code 原生 OTel 使用 gRPC,作为 HTTP 上报异常时的 fallback。 |

装好后会做什么

  • ~/.claude/cc-otel/ 放一个启动脚本
  • 备份你原来的 ~/.claude/settings.json(带时间戳,可随时还原)
  • 把上报相关配置写进 ~/.claude/settings.json

你原本的其他设置都会保留;重复运行不会产生重复条目,可以放心重装。

本地日志

安装后会在本机写入排查日志,只保留最近 3 天数据:

| 工具 | 日志路径 | |---|---| | Claude Code | ~/.claude/cc-otel/ai-otel.log | | Codex CLI | ~/.codex/ai-otel/ai-otel.log | | Gemini CLI | ~/.gemini/ai-otel/ai-otel.log |

采集了哪些数据

| | 内容 | |---|---| | ✅ 会采集 | 调用了哪些工具、每次耗时、是否成功、token 用量、当前目录、Git 信息 | | ❌ 不采集 | 你输入的提示词、代码正文、工具入参、API 原始内容 |

卸载

还原安装前的备份即可:

ls ~/.claude/settings.json.bak.* | tail -1 | xargs -I{} cp {} ~/.claude/settings.json
rm -rf ~/.claude/cc-otel

排查

| 现象 | 怎么办 | |---|---| | 启动 claude 没看到上报动作 | 打开 ~/.claude/settings.json,确认里面有一项 id: team:session-start | | 服务器一直收不到数据 | 用团队提供的地址和端口做连通性检查;IP 测试地址通常检查 4317,生产域名通常检查团队提供的 gRPC 端口 | | 想换服务器地址 | 直接重跑安装命令即可,会自动覆盖旧配置 |