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

dingjiai

v1.0.10

Published

DingJiaAI gateway configurator for AI CLI tools

Readme

dingjiai

dingjiai 是顶级AI(DingJiaAI)的网关一键配置器:把本机已安装的 Claude Code / Codex 快速接入 https://dingjiai.com

它是配置器,不是安装器——只配置已经装好的客户端,不安装 Node.js、Claude Code、Codex,不请求管理员权限。

使用

前置条件:本机已安装 Node.js 18+,以及 Claude Code 或 Codex 至少一个。

交互式(推荐,key 不进 shell history):

npx -y dingjiai

非交互式:

npx -y dingjiai -k sk-你的用户APIKey

只配置某一个客户端:

npx -y dingjiai -k sk-xxx --only claude
npx -y dingjiai -k sk-xxx --only codex

先预览、不写入任何文件:

npx -y dingjiai -k sk-xxx --dry-run

选项

| 选项 | 说明 | | --- | --- | | -k, --api-key <key> | 顶级AI用户 API Key;也可用环境变量 DINGJIAI_API_KEY | | --only <clients> | claudecodexclaude,codexall(默认:本机已安装的客户端) | | --claude-model <id> | 覆盖 Claude Code 的全部模型槽位 | | --codex-model <id> | 覆盖 Codex 模型 | | --dry-run | 仅打印配置计划,不请求网络、不写入配置 | | --skip-verify | 跳过模型列表验证,直接按内置优先级表写入 | | -v, --verbose | 显示底层 zcf 输出(已脱敏) | | -h, --help | 显示帮助 | | -V, --version | 显示版本 |

未知参数会直接报错退出,不会静默忽略。

它做什么

检测本机已安装的 Claude Code / Codex
-> 读取一次顶级AI用户 API Key
-> 请求顶级AI模型列表,验证 key 和可用模型
-> 按 src/model-priority.json 的优先级选择默认模型
-> 显示配置预览,等待确认
-> 调用锁定版本的 zcf 写入客户端配置

写入目标:

| 客户端 | Base URL | 本地配置 | | --- | --- | --- | | Claude Code | https://dingjiai.com/anthropic | ~/.claude/settings.json | | Codex | https://dingjiai.com/v1 | ~/.codex/config.toml + ~/.codex/auth.json |

模型选择

正常模式下先请求对应协议的模型列表(同时验证 API Key),再从可用模型里按 src/model-priority.json 的顺序选择;表里的模型都不可用时,使用接口返回的第一个模型。

手动指定的 --claude-model / --codex-model 必须在可用模型列表里,否则拒绝写入。--skip-verify 时不请求列表,直接使用优先级表或手动指定的模型。

安全边界

  • 不安装软件,不改系统环境变量,不请求管理员权限。
  • 不删除已有配置,写入方式为 merge。
  • 写入前显示预览并等待确认(y 才写入)。
  • 日志和摘要只显示脱敏 key;子进程输出中的 key 也会被脱敏。
  • API Key 会作为 zcf 子进程参数传入并写进客户端配置文件——这是客户端调用网关所必需的。共享机器上建议用交互输入而不是 -k

常见排查

  • 未检测到客户端:先安装 Claude Code 或 Codex,再重新运行。
  • API Key 验证失败:确认填的是顶级AI用户 key,不是上游 provider key。
  • 没有可用模型:登录控制台确认账号模型、余额和权限。
  • 配置后仍走旧地址:重启客户端,让它重新读取配置。
  • 想看底层细节:加 --verbose

开发

npm run check          # 版本 / 帮助 / dry-run 冒烟
node --check src/index.js

发版流程见 发版流程.md;设计文档和立项背景见 docs/

License

MIT