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

modelgo-config

v1.0.1

Published

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

Readme

    

🚀 modelgo-config

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

支持国际站 modelgo.ai 与国内站 modelgo.com

npm version npm downloads node license


30 秒上手

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

跑完直接启动,无需任何手动配置:

claude     # 启动 Claude Code
codex      # 启动 Codex

💡 不带 -r 时会先让你选择国际 / 国内站点;不带 -k 则会提示你粘贴 Key。


✨ 特性

  • 一条命令同时配置 Claude Code 和 Codex
  • 国际 / 国内双站,执行时用 -r 区分,无需改配置
  • ✅ 交互式 / 非交互式两种模式
  • ✅ 内置 BaseURL,无需手动输入
  • ✅ 配置完成后自动验证链路连通性
  • ✅ 极薄封装,复用业界成熟的 zcf 写入逻辑

安装

| 方式 | 命令 | 适用 | |---|---|---| | 免安装(推荐) | npx -y modelgo-config -k sk-xxx | 接入只需一次,跑完即走 | | 全局安装 | npm i -g modelgo-configmgc -k sk-xxx | 想反复使用,mgc 为简写 |


常见用法

# 不指定站点:交互式选择国际 / 国内
npx -y modelgo-config -k sk-你的token

# 指定国际站 modelgo.ai(全程非交互)
npx -y modelgo-config -k sk-你的token -r global

# 指定国内站 modelgo.com
npx -y modelgo-config -k sk-你的token -r domestic

# 只配 Claude Code(或换成 codex)
npx -y modelgo-config -k sk-你的token --only claude

# 跳过连通性验证
npx -y modelgo-config -k sk-你的token --skip-verify

命令行参数

| 参数 | 简写 | 说明 | |---|---|---| | --api-key <key> | -k | ModelGo API Key | | --region <area> | -r | global(国际 modelgo.ai)| domestic(国内 modelgo.com);省略则交互选择 | | --only <tool> | | claude | codex —— 只配置其一 | | --skip-verify | | 跳过连通性验证 | | --verbose | -v | 显示底层 zcf 子进程的详细输出 | | --help | -h | 显示帮助 | | --version | -V | 显示版本 |


工作原理

modelgo-configzcf 的薄封装:

  1. 通过交互或参数收集 API Key
  2. -r 选定区域,内置对应 BaseURL(国际 api.modelgo.ai、国内 api.modelgo.com
  3. 调用 npx zcf init 两次(一次配 cc Claude Code,一次配 cx Codex)
  4. zcf 实际写入:
    • Claude Code → ~/.claude/settings.json(注入 ANTHROPIC_BASE_URL + ANTHROPIC_API_KEY
    • Codex → ~/.codex/config.toml + ~/.codex/auth.json
  5. 通过 GET {BASE_URL}/v1/models 探测连通性

完全等价于手动执行(以国际站为例):

npx -y zcf init -s --code-type cc --provider custom --api-type auth_token \
  -u https://api.modelgo.ai -k sk-xxx
npx -y zcf init -s --code-type cx --provider custom --api-type auth_token \
  -u https://api.modelgo.ai/v1 -k sk-xxx

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


ModelGo 是什么

ModelGo 是统一的 LLM 网关与 AI 模型平台:聚合多家上游模型供应商,提供统一接口、配额、计费与限流体系,支持按量付费。


品牌资产

ModelGo 官方 Logo(OSS 公开地址,控制台 / 文档 / 本项目通用,避免重复找图):

| 站点 | Logo URL | |---|---| | 国际 modelgo.ai | https://modelgo-public.oss-cn-shanghai.aliyuncs.com/config-assets/2026/06/25/1782358005365119203-20260617-111815.png | | 国内 modelgo.com | https://modelgo-public.oss-cn-shanghai.aliyuncs.com/config-assets/2026/06/25/1782358025027347338-20260617-212926.png |

开发

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

致谢

核心配置写入逻辑由 zcf 提供,整体形态参考 easyrouter-config。本工具仅在其上做了 ModelGo 专属的预设封装与交互简化。

License

MIT © ModelGo