@simonyea/holysheep-cli 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +149 -92
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,156 +1,213 @@
1
1
  # 🐑 HolySheep CLI
2
2
 
3
- > 一键配置所有 AI 编程工具接入 HolySheep API — 国内直连,¥1=$1,无需魔法
3
+ <div align="center">
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/holysheep-cli)](https://www.npmjs.com/package/holysheep-cli)
5
+ **[English](#english) | [中文](#chinese)**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@simonyea/holysheep-cli?color=orange&label=npm)](https://www.npmjs.com/package/@simonyea/holysheep-cli)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@simonyea/holysheep-cli?color=blue)](https://www.npmjs.com/package/@simonyea/holysheep-cli)
6
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
- [![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Windows%20%7C%20Linux-lightgrey)](https://github.com/holysheep-ai/cli)
10
+ [![GitHub stars](https://img.shields.io/github/stars/holysheep123/holysheep-cli?style=social)](https://github.com/holysheep123/holysheep-cli)
11
+
12
+ <br/>
13
+
14
+ **One command to configure all AI coding tools with HolySheep API**<br/>
15
+ **一条命令,配置所有 AI 编程工具**
8
16
 
9
- **HolySheep CLI** 让你用一条命令,把 Claude Code、Codex、Gemini CLI、OpenCode、OpenClaw、Aider、Cursor、Continue.dev 全部接入 [HolySheep API](https://shop.holysheep.ai)。
17
+ <br/>
10
18
 
11
- 无需逐个工具手动配置环境变量和配置文件,一键搞定。
19
+ [🚀 Get Started](#quick-start) · [📦 npm](https://www.npmjs.com/package/@simonyea/holysheep-cli) · [🐑 HolySheep](https://shop.holysheep.ai)
20
+
21
+ </div>
12
22
 
13
23
  ---
14
24
 
15
- ## 安装
25
+ <a name="english"></a>
16
26
 
17
- ```bash
18
- npm install -g holysheep-cli
19
- ```
27
+ ## 🇬🇧 English
28
+
29
+ ### What is HolySheep CLI?
30
+
31
+ **HolySheep CLI** (`hs`) is a command-line tool that automatically configures all popular AI coding assistants to use [HolySheep API](https://shop.holysheep.ai) — a relay service that lets developers in China access Claude, GPT, and Gemini APIs **without a VPN**, at **¥1 = $1** exchange rate.
32
+
33
+ Instead of manually editing config files and environment variables for each tool, just run `hs setup` and you're done.
20
34
 
21
- 或者无需安装直接运行:
35
+ ### Supported Tools
36
+
37
+ | Tool | Install | Config Method | Hot Reload |
38
+ |------|---------|---------------|-----------|
39
+ | [Claude Code](https://docs.anthropic.com/claude-code) | `npm i -g @anthropic-ai/claude-code` | `~/.claude/settings.json` | ✅ |
40
+ | [Codex CLI](https://github.com/openai/codex) | `npm i -g @openai/codex` | `~/.codex/config.yaml` | — |
41
+ | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `npm i -g @google/gemini-cli` | `~/.gemini/settings.json` | — |
42
+ | [OpenCode](https://github.com/sst/opencode) | `npm i -g opencode-ai` | `~/.config/opencode/config.json` | — |
43
+ | [OpenClaw](https://github.com/iOfficeAI/AionUi) | Download from website | `~/.openclaw/settings.json` | ✅ |
44
+ | [Aider](https://aider.chat) | `pip install aider-chat` | `~/.aider.conf.yml` | — |
45
+ | [Cursor](https://cursor.sh) | Download from website | GUI guided setup | — |
46
+ | [Continue.dev](https://continue.dev) | VS Code marketplace | `~/.continue/config.json` | ✅ |
47
+
48
+ ### Installation
22
49
 
23
50
  ```bash
24
- npx holysheep-cli setup
51
+ npm install -g @simonyea/holysheep-cli
25
52
  ```
26
53
 
27
- ---
28
-
29
- ## 快速开始
54
+ No npm? Try npx (no install needed):
30
55
 
31
- ### 第一步:注册账号,获取 API Key
56
+ ```bash
57
+ npx @simonyea/holysheep-cli setup
58
+ ```
32
59
 
33
- 前往 **[shop.holysheep.ai](https://shop.holysheep.ai)** 注册账号,充值后在「API 密钥」页面创建 `cr_xxx` 格式的密钥。
60
+ ### Quick Start
34
61
 
35
- > 💡 ¥1 = $1 美元额度,余额永久有效,按量计费
62
+ **Step 1** Sign up at **[shop.holysheep.ai](https://shop.holysheep.ai)** and get your API Key (`cr_xxx`)
36
63
 
37
- ### 第二步:一键配置
64
+ **Step 2** — Run setup:
38
65
 
39
66
  ```bash
40
67
  hs setup
41
68
  ```
42
69
 
43
- 按提示选择要配置的工具,输入 API Key,完成!
44
-
45
70
  ```
46
- 🐑 HolySheep CLI — 一键配置 AI 工具
71
+ 🐑 HolySheep CLI — Configure AI Tools
47
72
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
48
73
  ? API Key (cr_xxx): cr_xxxxxxxxxxxxxxxx
49
- ? 选择要配置的工具:
50
- ✅ Claude Code (已安装)
51
- ✅ Gemini CLI (已安装)
52
- ○ Codex CLI (未安装)
53
- ○ Aider (未安装)
74
+ ? Select tools to configure:
75
+ Claude Code (installed)
76
+ Gemini CLI (installed)
77
+ ○ Codex CLI (not installed)
78
+ ○ Aider (not installed)
54
79
 
55
- ✓ Claude Code → ~/.claude/settings.json (热切换,无需重启)
80
+ ✓ Claude Code → ~/.claude/settings.json (hot reload, no restart needed)
56
81
  ✓ Gemini CLI → ~/.gemini/settings.json
57
- 环境变量已写入: ~/.zshrc
82
+ Env vars written to ~/.zshrc
58
83
 
59
- 配置完成!
84
+ Done! All tools configured.
60
85
  ```
61
86
 
62
- ---
87
+ ### Commands
63
88
 
64
- ## 命令
89
+ | Command | Description |
90
+ |---------|-------------|
91
+ | `hs setup` | Configure all AI tools interactively |
92
+ | `hs doctor` | Check configuration status & connectivity |
93
+ | `hs balance` | View account balance and usage |
94
+ | `hs tools` | List all supported tools |
95
+ | `hs reset` | Remove all HolySheep configuration |
65
96
 
66
- | 命令 | 说明 |
67
- |------|------|
68
- | `hs setup` | 一键配置所有 AI 工具 |
69
- | `hs doctor` | 检查配置状态和连通性 |
70
- | `hs balance` | 查看账户余额和用量 |
71
- | `hs tools` | 列出所有支持的工具 |
72
- | `hs reset` | 清除所有配置,恢复默认 |
97
+ ### API Endpoints
73
98
 
74
- ---
99
+ | Usage | URL |
100
+ |-------|-----|
101
+ | Anthropic SDK / Claude Code | `https://api.holysheep.ai` (no `/v1`) |
102
+ | OpenAI-compatible / Codex / Aider | `https://api.holysheep.ai/v1` (with `/v1`) |
75
103
 
76
- ## 支持的工具
104
+ ### Why HolySheep?
77
105
 
78
- | 工具 | 安装方式 | 配置方式 | 热切换 |
79
- |------|---------|---------|-------|
80
- | **[Claude Code](https://docs.anthropic.com/claude-code)** | `npm i -g @anthropic-ai/claude-code` | `~/.claude/settings.json` | |
81
- | **[Codex CLI](https://github.com/openai/codex)** | `npm i -g @openai/codex` | `~/.codex/config.yaml` + 环境变量 | — |
82
- | **[Gemini CLI](https://github.com/google-gemini/gemini-cli)** | `npm i -g @google/gemini-cli` | `~/.gemini/settings.json` | — |
83
- | **[OpenCode](https://github.com/sst/opencode)** | `npm i -g opencode-ai` | `~/.config/opencode/config.json` | — |
84
- | **[OpenClaw](https://github.com/iOfficeAI/AionUi)** | 官网下载 | `~/.openclaw/settings.json` | ✅ |
85
- | **[Aider](https://aider.chat)** | `pip install aider-chat` | `~/.aider.conf.yml` + 环境变量 | — |
86
- | **[Cursor](https://cursor.sh)** | 官网下载 | GUI 配置引导 | — |
87
- | **[Continue.dev](https://continue.dev)** | VS Code 插件市场 | `~/.continue/config.json` | ✅ |
106
+ - 🇨🇳 **China-accessible** Direct connection, no VPN needed
107
+ - 💰 **Best rate** — ¥1 = $1, balance never expires, pay-as-you-go
108
+ - **All major models** Claude 3.5/3.7, GPT-4o, Gemini 1.5 Pro and more
109
+ - 🔒 **Official relay** Direct passthrough to official APIs, no censorship
88
110
 
89
111
  ---
90
112
 
91
- ## 接入信息
113
+ <a name="chinese"></a>
92
114
 
93
- | 用途 | 地址 |
94
- |------|------|
95
- | Anthropic SDK / Claude Code | `https://api.holysheep.ai` (不带 /v1) |
96
- | OpenAI 兼容 / Codex / Aider | `https://api.holysheep.ai/v1` (带 /v1) |
115
+ ## 🇨🇳 中文
97
116
 
98
- ---
117
+ ### 什么是 HolySheep CLI?
118
+
119
+ **HolySheep CLI**(命令 `hs`)是一个命令行工具,帮你一键配置所有主流 AI 编程助手接入 [HolySheep API](https://shop.holysheep.ai)。
120
+
121
+ HolySheep 是面向中国开发者的 Claude/GPT/Gemini 官方 API 中转服务,**国内直连、无需翻墙、¥1=$1**。
99
122
 
100
- ## 手动配置参考
123
+ 不用再逐个工具手动改配置文件和环境变量,执行 `hs setup` 一步搞定。
101
124
 
102
- 如果你不想用 CLI,也可以手动配置:
125
+ ### 支持的工具
126
+
127
+ | 工具 | 安装方式 | 配置方式 | 热切换 |
128
+ |------|---------|---------|-------|
129
+ | [Claude Code](https://docs.anthropic.com/claude-code) | `npm i -g @anthropic-ai/claude-code` | `~/.claude/settings.json` | ✅ |
130
+ | [Codex CLI](https://github.com/openai/codex) | `npm i -g @openai/codex` | `~/.codex/config.yaml` | — |
131
+ | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `npm i -g @google/gemini-cli` | `~/.gemini/settings.json` | — |
132
+ | [OpenCode](https://github.com/sst/opencode) | `npm i -g opencode-ai` | `~/.config/opencode/config.json` | — |
133
+ | [OpenClaw](https://github.com/iOfficeAI/AionUi) | 官网下载 | `~/.openclaw/settings.json` | ✅ |
134
+ | [Aider](https://aider.chat) | `pip install aider-chat` | `~/.aider.conf.yml` | — |
135
+ | [Cursor](https://cursor.sh) | 官网下载 | 引导式 GUI 配置 | — |
136
+ | [Continue.dev](https://continue.dev) | VS Code 插件市场 | `~/.continue/config.json` | ✅ |
137
+
138
+ ### 安装
103
139
 
104
- ### Claude Code
105
140
  ```bash
106
- # ~/.claude/settings.json
107
- {
108
- "env": {
109
- "ANTHROPIC_AUTH_TOKEN": "cr_xxx",
110
- "ANTHROPIC_BASE_URL": "https://api.holysheep.ai"
111
- }
112
- }
141
+ npm install -g @simonyea/holysheep-cli
113
142
  ```
114
143
 
115
- ### 环境变量(适用于所有工具)
144
+ 没有 npm?用 npx 免安装直接运行:
145
+
116
146
  ```bash
117
- export ANTHROPIC_API_KEY="cr_xxx"
118
- export ANTHROPIC_BASE_URL="https://api.holysheep.ai"
119
- export OPENAI_API_KEY="cr_xxx"
120
- export OPENAI_BASE_URL="https://api.holysheep.ai/v1"
147
+ npx @simonyea/holysheep-cli setup
121
148
  ```
122
149
 
123
- ### Codex CLI (`~/.codex/config.yaml`)
124
- ```yaml
125
- providers:
126
- - name: HolySheep
127
- baseURL: https://api.holysheep.ai/v1
128
- envKey: OPENAI_API_KEY
129
- model: claude-sonnet-4-5
130
- ```
150
+ ### 快速开始
151
+
152
+ **第一步** — 前往 **[shop.holysheep.ai](https://shop.holysheep.ai)** 注册账号,充值后创建 API Key(`cr_` 开头)
153
+
154
+ **第二步** — 运行配置向导:
131
155
 
132
- ### Aider
133
156
  ```bash
134
- aider --openai-api-base https://api.holysheep.ai/v1 \
135
- --openai-api-key cr_xxx \
136
- --model openai/claude-sonnet-4-5
157
+ hs setup
137
158
  ```
138
159
 
139
- ---
160
+ ```
161
+ 🐑 HolySheep CLI — 一键配置 AI 工具
162
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
163
+ ? API Key (cr_xxx): cr_xxxxxxxxxxxxxxxx
164
+ ? 选择要配置的工具:
165
+ ✅ ● Claude Code (已安装)
166
+ ✅ ● Gemini CLI (已安装)
167
+ ○ Codex CLI (未安装)
168
+ ○ Aider (未安装)
169
+
170
+ ✓ Claude Code → ~/.claude/settings.json (热切换,无需重启)
171
+ ✓ Gemini CLI → ~/.gemini/settings.json
172
+ ✓ 环境变量已写入 ~/.zshrc
173
+
174
+ ✅ 配置完成!
175
+ ```
176
+
177
+ ### 命令说明
178
+
179
+ | 命令 | 说明 |
180
+ |------|------|
181
+ | `hs setup` | 交互式配置所有 AI 工具 |
182
+ | `hs doctor` | 检查配置状态和连通性 |
183
+ | `hs balance` | 查看账户余额和用量 |
184
+ | `hs tools` | 列出所有支持的工具 |
185
+ | `hs reset` | 清除所有 HolySheep 配置 |
186
+
187
+ ### 接入地址
140
188
 
141
- ## 常见问题
189
+ | 用途 | 地址 |
190
+ |------|------|
191
+ | Anthropic SDK / Claude Code | `https://api.holysheep.ai`(不带 /v1) |
192
+ | OpenAI 兼容 / Codex / Aider | `https://api.holysheep.ai/v1`(带 /v1) |
142
193
 
143
- **Q: 支持哪些模型?**
144
- A: 支持 Claude 3.5/3.7 全系、GPT-4o、Gemini 1.5 Pro 等主流模型,详见 [shop.holysheep.ai/app/apikeys](https://shop.holysheep.ai/app/apikeys)
194
+ ### 为什么选 HolySheep?
145
195
 
146
- **Q: 国内能直接用吗?**
147
- A: 能,`api.holysheep.ai` 国内直连,无需代理。
196
+ - 🇨🇳 **国内直连** — 无需代理,开箱即用
197
+ - 💰 **全网最优汇率** — ¥1=$1,余额永久有效,按量计费
198
+ - ⚡ **全主流模型** — Claude 3.5/3.7、GPT-4o、Gemini 1.5 Pro 等
199
+ - 🔒 **官方直转** — 直连官方 API,无任何阉割
200
+
201
+ ### 常见问题
148
202
 
149
203
  **Q: API Key 格式是什么?**
150
- A: `cr_` 开头的字符串,在控制台「API 密钥」页面创建。
204
+ A: `cr_` 开头的字符串,在 [shop.holysheep.ai](https://shop.holysheep.ai) 控制台「API 密钥」页面创建。
205
+
206
+ **Q: 支持 Windows 吗?**
207
+ A: 支持,需要 Node.js 16+。环境变量会写入用户目录下的 shell 配置文件。
151
208
 
152
- **Q: 和官方 API 有什么区别?**
153
- A: 直接对接官方 API,无任何阉割,汇率 ¥1=$1 全网最优。
209
+ **Q: 如何恢复原来的配置?**
210
+ A: 运行 `hs reset` 即可清除所有 HolySheep 相关配置。
154
211
 
155
212
  ---
156
213
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "一键配置所有 AI 编程工具接入 HolySheep API — Claude Code / Codex / Gemini CLI / OpenCode / OpenClaw / Aider / Cursor",
5
5
  "keywords": [
6
6
  "claude",