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

xfusion-codehelper

v1.0.1

Published

Automated setup wizard for AI coding tools (Claude Code, OpenCode)

Readme

XFusion Coding Helper

自动化配置向导,支持 AI 编码工具(Claude Code、OpenCode)的一键安装、配置与启动。

功能特性

  • 🌍 多语言支持 — 中文 / English 界面自由切换
  • 🔍 自动检测 — 检测系统中已安装的 AI 编码工具
  • 📦 自动安装 — 一键安装缺失的平台工具
  • 🔑 统一 API 配置 — 集中管理 API URL 和密钥
  • 🤖 自动获取模型 — 自动拉取可用模型列表
  • API 连接验证 — 测试 API 连接是否正常
  • 🚀 一键启动 — 配置完成后直接启动工具

使用说明

启动程序

在项目目录下运行:

npm start

完整操作流程

按照交互式向导逐步操作:

第一步:选择语言

Select your language / 选择界面语言
> 中文 (Chinese)
  English

第二步:检测已安装的平台

  • 自动检测系统中 Claude Code 和 OpenCode 是否已安装
  • 已安装的工具会显示 ✅,未安装的显示 ❌

第三步:选择要配置的平台

  • 勾选你需要配置的工具(默认勾选已安装的)
  • 支持同时配置多个平台

第四步:安装缺失的平台(可选)

  • 如果选择了未安装的平台,向导会询问是否自动安装
  • 确认后自动通过 npm 完成安装

第五步:输入 API 信息

  • 输入 API 地址(如 https://api.example.com/v1
  • 输入 API 密钥
  • 支持去除首尾多余的引号或括号

第六步:API 连接验证

  • 自动测试 API 连接是否正常
  • 自动获取可用的模型列表
  • 如果连接失败,可以选择:
    • 重新输入 API 信息
    • 跳过验证直接配置
    • 退出程序
  • 如果 API 返回 404,会引导你手动输入模型名称

第七步:选择模型

  • 从自动获取的模型列表中选择
  • 如果未能获取模型列表,可手动输入模型名称

第八步:写入配置

  • 自动生成各平台的配置文件
  • Claude Code 配置写入到 settings.json
  • OpenCode 配置写入到 opencode.json

第九步:启动工具

  • 配置完成后可选择立即启动工具
  • OpenCode 额外支持选择 CLI 模式或 Web 模式
  • 也可以选择稍后手动启动

快速使用示例

# 进入项目目录
cd coder-helper

# 启动配置向导
npm start

支持的工具平台

  • Claude Code — Anthropic 官方 CLI,AI 编码助手
  • OpenCode — 社区开源编码助手

配置文件说明

Claude Code 配置

  • 配置文件路径: C:\Users\<用户名>\.claude\settings.json
  • 旧版路径: C:\Users\<用户名>\.config\claude-code\config.json
  • 配置格式:
{
  "env": {
    "ANTHROPIC_BASE_URL": "你的API地址",
    "ANTHROPIC_AUTH_TOKEN": "你的API密钥",
    "ANTHROPIC_MODEL": "选择的模型名称"
  }
}

OpenCode 配置

  • 配置文件路径: C:\Users\<用户名>\.config\opencode\opencode.json
  • 配置格式:
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "你的服务商名称": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "你的服务商名称",
      "options": {
        "baseURL": "你的API地址",
        "apiKey": "你的API密钥"
      },
      "models": {
        "选择的模型名称": {
          "name": "选择的模型名称"
        }
      }
    }
  }
}

系统要求

  • Node.js 14 或更高版本
  • 操作系统 Windows(主要支持)
  • npm(安装 Node.js 时会自动安装)

常见问题排查

API 连接失败

  • 检查 API 地址是否正确(注意协议头 https://
  • 验证 API 密钥是否有效
  • 确认网络连接正常,能否访问 API 服务器
  • 如果是自建 API 服务,确认服务已启动

安装失败

  • 如果权限不足,请以管理员身份运行终端
  • 检查 npm 是否正常安装:npm --version
  • 尝试手动安装:npm install -g opencode-ai

工具启动失败

  • 确认工具已在系统 PATH 环境变量中
  • 尝试手动启动:claudeopencode
  • 安装完成后重启终端再试

开发指南

# 克隆仓库
git clone <仓库地址>
cd coder-helper

# 安装依赖
npm install

# 本地运行
npm start

# 本地调试(直接运行入口文件)
node src/index.js

项目结构

coder-helper/
├── src/
│   ├── index.js              # 主入口
│   ├── detectors/            # 平台检测模块
│   │   ├── claudecode.js     # Claude Code 检测
│   │   └── opencode.js       # OpenCode 检测
│   ├── installers/           # 安装模块
│   │   ├── claudecode.js     # Claude Code 安装
│   │   └── opencode.js       # OpenCode 安装
│   ├── configurators/        # 配置模块
│   │   ├── claudecode.js     # Claude Code 配置写入
│   │   └── opencode.js       # OpenCode 配置写入
│   ├── validators/           # 验证模块
│   │   └── api.js            # API 连接验证
│   ├── launchers/            # 启动模块
│   │   ├── claudecode.js     # Claude Code 启动
│   │   └── opencode.js       # OpenCode 启动
│   └── i18n/                 # 国际化语言包
│       ├── zh-CN.js          # 中文
│       └── en-US.js          # 英文
└── package.json

许可证

MIT

作者

Xfusion

贡献指南

欢迎提交 Pull Request 贡献代码!如有问题或建议,请提交 Issue。