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

@model-go/config

v2.0.3

Published

🚀 一键把 ModelGo 接入 12 个主流 AI 编程客户端(Claude Code / Codex / Crush / OpenCode 等)—— 粘贴 Key 即用

Downloads

563

Readme

    

🚀 @model-go/config

一键把 ModelGo 接入 12 个主流 AI 编程客户端 —— 粘贴 Key 即用

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

npm version npm downloads node license


30 秒上手

npx -y @model-go/config -k sk-你的token

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

claude     # 启动 Claude Code
codex      # 启动 Codex

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


✨ 特性

  • 一条命令配置多达 12 个 AI 编程客户端(交互多选,或 --only all 全配)
  • 国际 / 国内双站,执行时用 -r 区分,无需改配置
  • ✅ 交互式 / 非交互式两种模式
  • ✅ 内置 BaseURL,无需手动输入
  • ✅ 配置完成后自动验证链路连通性
  • ✅ Claude Code / Codex 复用业界成熟的 zcf 写入逻辑

支持的客户端

| id | 客户端 | 配置写入 | |---|---|---| | claude | Claude Code | ~/.claude/settings.json(via zcf) | | codex | Codex | ~/.codex/config.toml + auth.json(via zcf) | | openclaw | OpenClaw | openclaw onboard 子命令(需先装 openclaw) | | hermes | Hermes | hermes config set,失败回退写 ~/.hermes/config.yaml | | factory | Factory Droid | ~/.factory/config.json | | cc-switch | CC Switch | ccswitch:// deeplink 唤起 | | copilot | Copilot CLI | shell 环境变量(~/.zshrc / setx) | | nanobot | nanobot | ~/.nanobot/config.json | | crush | Crush | ~/.config/crush/crush.json | | opencode | OpenCode | ~/.config/opencode/opencode.json | | oh-my-pi | Oh My Pi | ~/.omp/agent/models.yml + .env | | codebuddy | CodeBuddy | ~/.codebuddy/models.json + settings.json |

不带 --only 且交互式运行时,会弹出多选让你勾选;非交互(带 -k--only)默认配 Claude Code + Codex。


安装

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


常见用法

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

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

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

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

# 一次配多个客户端
npx -y @model-go/config -k sk-你的token --only claude,codex,crush

# 一键配全部 12 个客户端
npx -y @model-go/config -k sk-你的token --only all

# 跳过连通性验证
npx -y @model-go/config -k sk-你的token --skip-verify

命令行参数

| 参数 | 简写 | 说明 | |---|---|---| | --api-key <key> | -k | ModelGo API Key | | --region <area> | -r | global(国际 modelgo.ai)| domestic(国内 modelgo.com);省略则交互选择 | | --only <list> | | 逗号分隔的客户端 id(见上表)或 all;省略则交互多选 | | --skip-verify | | 跳过连通性验证 | | --verbose | -v | 显示底层 zcf 子进程的详细输出 | | --help | -h | 显示帮助 | | --version | -V | 显示版本 |


工作原理

@model-go/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 @model-go/config


ModelGo 是什么

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


开发

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

License

MIT © ModelGo