一键配置工具
本工具当前仅对已安装的 Claude Code、OpenClaw、OpenCode 写入配置,不负责安装工具本体。
快速开始
确保已安装 Node.js >= 18,然后运行以下命令:
npx @alayacode/coding-helper环境要求:Node.js >= 18.0.0
功能特性
- 交互式设置向导 — 分步引导完成所有配置
- 自动检测已安装的编码工具
- 自动写入所选工具配置文件,并自动备份原文件
- MCP 用量查询插件 — 在 Claude Code 中直接查询套餐用量
- Doctor 诊断命令 — 检查环境、网络、Key、工具状态
- 中英文双语界面
支持的工具
| 工具 | 自动配置 |
|---|---|
| Claude Code | ✅ ~/.claude/settings.json |
| OpenClaw | ✅ ~/.openclaw/openclaw.json |
| OpenCode | ✅ ~/.config/opencode/opencode.json |
配置流程
- 选择界面语言(中文 / English)
- 输入服务地址(默认
codingplan.alayanew.com) - 输入 API Key(从控制台获取的
sk-xxx密钥) - 自动验证 Key 有效性并获取可用模型列表
- 选择默认模型
- 选择要配置的编码工具
- 自动写入各工具的配置文件
- 可选安装 MCP 用量查询插件
CLI 命令
交互式配置(默认命令)
交互式向导,引导完成语言选择、登录认证、模型选择、工具配置全流程。
coding-helper
coding-helper setup认证管理
管理 API Key 的设置、查看、清除和重新加载。
# 交互式登录(可选浏览器 OAuth 或手动输入 Key)
coding-helper auth
coding-helper auth login
# 直接设置 Key(适合脚本/自动化)
coding-helper auth set sk-xxx
coding-helper auth set sk-xxx --server https://codingplan.alayanew.com
# 查看已保存的 Key(脱敏显示)
coding-helper auth show
# 清除已保存的 Key
coding-helper auth revoke
# 用已保存的 Key 重新写入工具配置文件
coding-helper auth reload
coding-helper auth reload claude-code用量查询
查看当前套餐的窗口用量和周期用量百分比(需要先完成认证)。
coding-helper usage环境诊断
检查 Node.js 版本、网络连通性、API Key 有效性、工具安装和配置状态。
coding-helper doctor切换语言
coding-helper lang zh
coding-helper lang en非交互式快速配置
三条命令完成配置,适合已有 Key 的用户或批量部署场景。
# 设置 Key → 写入 Claude Code 配置 → 开始编码
coding-helper auth set sk-xxx --server https://codingplan.alayanew.com
coding-helper auth reload claude-code
claudeMCP 插件
配置时可选安装 MCP 插件到 Claude Code,在编码过程中直接查询用量。
用量查询 — 查询当前 5 小时窗口和 7 天窗口的用量百分比
最后更新于
这篇文档对你有帮助吗?
