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

easyrouter-config

v1.0.17

Published

🚀 一键把 EasyRouter 接入 Claude Code & Codex —— 粘贴 Key 即用

Downloads

200

Readme

easyrouter-config

🚀 一键把 EasyRouter 接入 Claude Code & Codex —— 粘贴 Key 即用

特性

  • ✅ 一条命令同时配置 Claude Code 和 Codex
  • ✅ 交互式 / 非交互式两种模式
  • ✅ 内置 EasyRouter 按量付费 BaseURL,无需手动输入
  • ✅ 配置完成后自动验证链路连通性
  • ✅ 极薄封装,复用业界成熟的 zcf 写入逻辑

快速开始

交互式(推荐新手)

npx -y easyrouter-config

按提示粘贴 API Key、回车即可。

一行命令(按量付费)

npx -y easyrouter-config -k sk-你的token

仅此一种部署模式 —— 内置 https://easyrouter.io,按 token 实际用量计费。

只配 Claude Code 或只配 Codex

# 只配 Claude Code
npx -y easyrouter-config -k sk-你的token --only claude

# 只配 Codex
npx -y easyrouter-config -k sk-你的token --only codex

完成后直接运行:

claude     # 启动 Claude Code
codex      # 启动 Codex

命令行参数

| 参数 | 简写 | 说明 | |---|---|---| | --api-key <key> | -k | EasyRouter API Key(可省略 sk- 前缀) | | --only <tool> | | claude | codex —— 只配置其一 | | --skip-verify | | 跳过连通性验证 | | --verbose | -v | 显示底层 zcf 子进程的详细输出 | | --help | -h | 显示帮助 | | --version | -V | 显示版本 |

工作原理

easyrouter-configzcf 的薄封装:

  1. 通过交互或参数收集 API Key
  2. 内置 EasyRouter 按量付费 BaseURL(https://easyrouter.io
  3. 调用 npx zcf init 两次(一次配 cc,一次配 cx
  4. zcf 实际写入:
    • Claude Code → ~/.claude/settings.json(注入 ANTHROPIC_BASE_URLANTHROPIC_API_KEYenv
    • Codex → ~/.codex/config.toml + ~/.codex/auth.json
  5. 通过 GET {BASE_URL}/v1/models 探测连通性

完全等价于手动执行:

npx -y zcf init -s --code-type cc -p custom --api-type auth_token \
  -u https://easyrouter.io -k sk-xxx
npx -y zcf init -s --code-type cx -p custom --api-type auth_token \
  -u https://easyrouter.io/v1 -k sk-xxx

但你只需要记住一行:npx -y easyrouter-config

EasyRouter 是什么

EasyRouter 是下一代 LLM 网关与 AI 资产管理平台:

  • 统一接口聚合 40+ 上游模型供应商(OpenAI / Claude / Gemini / Azure / Bedrock …)
  • 完整的用户、配额、计费、限流体系
  • 支持按量付费

致谢

本工具的核心配置写入逻辑由 zcf 提供。 我们仅在其上做了 EasyRouter 专属的预设封装与交互简化。

特别感谢 @UfoMiao 与 zcf 团队的开源贡献。 推荐对工作流定制有更多需求的用户直接使用 zcf 原生命令。

开发

npm install
npm run build
node ./dist/index.js --help

License

MIT © QuantumNous