@simonyea/holysheep-cli 1.0.0 → 1.0.1
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.
- package/README.md +149 -92
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,156 +1,213 @@
|
|
|
1
1
|
# 🐑 HolySheep CLI
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
[
|
|
5
|
+
**[English](#english) | [中文](#chinese)**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@simonyea/holysheep-cli)
|
|
8
|
+
[](https://www.npmjs.com/package/@simonyea/holysheep-cli)
|
|
6
9
|
[](LICENSE)
|
|
7
|
-
[](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
|
-
|
|
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
|
-
|
|
18
|
-
|
|
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
|
-
|
|
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
|
-
|
|
56
|
+
```bash
|
|
57
|
+
npx @simonyea/holysheep-cli setup
|
|
58
|
+
```
|
|
32
59
|
|
|
33
|
-
|
|
60
|
+
### Quick Start
|
|
34
61
|
|
|
35
|
-
|
|
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 —
|
|
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
|
-
✓
|
|
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
|
-
|
|
81
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
147
|
-
|
|
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_`
|
|
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:
|
|
153
|
-
A:
|
|
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.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "一键配置所有 AI 编程工具接入 HolySheep API — Claude Code / Codex / Gemini CLI / OpenCode / OpenClaw / Aider / Cursor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -39,4 +39,4 @@
|
|
|
39
39
|
"node-fetch": "^2.7.0",
|
|
40
40
|
"ora": "^5.4.1"
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
}
|