create-squirrel-opencode-harness 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.
Files changed (2) hide show
  1. package/README.md +89 -29
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,13 +14,20 @@
14
14
  - 🌐 Multi-language support (English/Chinese)
15
15
  - 📁 Automatic `.opencode/` directory structure
16
16
 
17
+ ## Prerequisites
18
+
19
+ Before installing, ensure you have:
20
+
21
+ - **Opencode CLI installed** - Install globally: `npm i -g opencode-ai`
22
+ - **AI Provider configured** - Set up your API keys in Opencode (OpenAI, Anthropic, Fireworks, etc.)
23
+
17
24
  ## Quick Start
18
25
 
19
- No installation needed! Use `npm init` or `npx`:
26
+ No installation needed! Use `npm create` or `npx`:
20
27
 
21
28
  ```bash
22
- # Using npm init (recommended)
23
- npm init squirrel-opencode-harness "fireworks-ai/accounts/fireworks/routers/kimi-k2p5-turbo"
29
+ # Using npm create (recommended)
30
+ npm create squirrel-opencode-harness "fireworks-ai/accounts/fireworks/routers/kimi-k2p5-turbo"
24
31
 
25
32
  # Using npx
26
33
  npx create-squirrel-opencode-harness "fireworks-ai/accounts/fireworks/routers/kimi-k2p5-turbo"
@@ -68,22 +75,20 @@ echo "your-model-id" | create-squirrel-opencode-harness --stdin
68
75
  create-squirrel-opencode-harness --interactive
69
76
  ```
70
77
 
71
- ### With npm init
72
-
73
- When using `npm init`, pass arguments after `--`:
78
+ ### With npm create
74
79
 
75
80
  ```bash
76
- # Basic usage with npm init
77
- npm init squirrel-opencode-harness -- "your-model-id"
81
+ # Basic usage with npm create
82
+ npm create squirrel-opencode-harness "your-model-id"
78
83
 
79
84
  # With language option
80
- npm init squirrel-opencode-harness -- "your-model-id" --lang zh
85
+ npm create squirrel-opencode-harness "your-model-id" --lang zh
81
86
 
82
87
  # Interactive mode
83
- npm init squirrel-opencode-harness -- --interactive --lang zh
88
+ npm create squirrel-opencode-harness --interactive --lang zh
84
89
 
85
90
  # Using stdin (pipe model id)
86
- echo "your-model-id" | npm init squirrel-opencode-harness -- --stdin
91
+ echo "your-model-id" | npm create squirrel-opencode-harness --stdin
87
92
  ```
88
93
 
89
94
  ### Language Selection
@@ -140,13 +145,38 @@ Options:
140
145
  └── sprint-status-template.md
141
146
  ```
142
147
 
148
+ ## Next Steps (After Installation)
149
+
150
+ Once the harness is scaffolded, follow these steps to start working:
151
+
152
+ ### 1. Start Opencode
153
+
154
+ ```bash
155
+ # In the same directory where you ran the scaffold
156
+ opencode
157
+ ```
158
+
159
+ ### 2. Switch to Harness Agent
160
+
161
+ - Press **Tab** to cycle through available agents
162
+ - Select **`harness`** agent - this is your main interface for AI collaboration
163
+ - ⚠️ **Important**: Always use the `harness` agent for communication. Do NOT use `planner`, `generator`, or `evaluator` directly - the harness will orchestrate these automatically.
164
+
165
+ ### 3. Begin Your First Sprint
166
+
167
+ ```
168
+ You: I want to build a todo list app
169
+
170
+ Harness: [Will create a sprint contract and guide you through the process]
171
+ ```
172
+
143
173
  ## Examples
144
174
 
145
175
  ### Example 1: Quick Start
146
176
 
147
177
  ```bash
148
- # Using npm init (no install needed)
149
- npm init squirrel-opencode-harness -- "openai/gpt-4"
178
+ # Using npm create (no install needed)
179
+ npm create squirrel-opencode-harness "openai/gpt-4"
150
180
 
151
181
  # Or with npx
152
182
  npx create-squirrel-opencode-harness "openai/gpt-4"
@@ -155,7 +185,7 @@ npx create-squirrel-opencode-harness "openai/gpt-4"
155
185
  ### Example 2: Interactive Mode in Chinese
156
186
 
157
187
  ```bash
158
- npm init squirrel-opencode-harness -- --interactive --lang zh
188
+ npm create squirrel-opencode-harness --interactive --lang zh
159
189
 
160
190
  # Or with npx
161
191
  npx create-squirrel-opencode-harness --interactive --lang zh
@@ -165,7 +195,7 @@ npx create-squirrel-opencode-harness --interactive --lang zh
165
195
 
166
196
  ```bash
167
197
  export MODEL_ID="anthropic/claude-3-sonnet"
168
- echo $MODEL_ID | npm init squirrel-opencode-harness -- --stdin
198
+ echo $MODEL_ID | npm create squirrel-opencode-harness --stdin
169
199
  ```
170
200
 
171
201
  ## Error Handling
@@ -204,13 +234,20 @@ MIT License - see [LICENSE](LICENSE) file for details.
204
234
  - 🌐 多语言支持(英文/中文)
205
235
  - 📁 自动创建 `.opencode/` 目录结构
206
236
 
237
+ ## 前置要求
238
+
239
+ 安装前,请确保您已具备:
240
+
241
+ - **Opencode CLI 已安装** - 全局安装:`npm i -g opencode-ai`
242
+ - **AI Provider 已配置** - 在 Opencode 中设置您的 API 密钥(OpenAI、Anthropic、Fireworks 等)
243
+
207
244
  ## 快速开始
208
245
 
209
- 无需安装!直接使用 `npm init` 或 `npx`:
246
+ 无需安装!直接使用 `npm create` 或 `npx`:
210
247
 
211
248
  ```bash
212
- # 使用 npm init(推荐)
213
- npm init squirrel-opencode-harness "fireworks-ai/accounts/fireworks/routers/kimi-k2p5-turbo"
249
+ # 使用 npm create(推荐)
250
+ npm create squirrel-opencode-harness "fireworks-ai/accounts/fireworks/routers/kimi-k2p5-turbo"
214
251
 
215
252
  # 使用 npx
216
253
  npx create-squirrel-opencode-harness "fireworks-ai/accounts/fireworks/routers/kimi-k2p5-turbo"
@@ -258,22 +295,20 @@ echo "你的模型id" | create-squirrel-opencode-harness --stdin
258
295
  create-squirrel-opencode-harness --interactive
259
296
  ```
260
297
 
261
- ### 使用 npm init
262
-
263
- 使用 `npm init` 时,在 `--` 后传递参数:
298
+ ### 使用 npm create
264
299
 
265
300
  ```bash
266
301
  # 基础用法
267
- npm init squirrel-opencode-harness -- "your-model-id"
302
+ npm create squirrel-opencode-harness "your-model-id"
268
303
 
269
304
  # 指定语言
270
- npm init squirrel-opencode-harness -- "your-model-id" --lang zh
305
+ npm create squirrel-opencode-harness "your-model-id" --lang zh
271
306
 
272
307
  # 交互模式
273
- npm init squirrel-opencode-harness -- --interactive --lang zh
308
+ npm create squirrel-opencode-harness --interactive --lang zh
274
309
 
275
310
  # 使用标准输入(管道输入模型id)
276
- echo "your-model-id" | npm init squirrel-opencode-harness -- --stdin
311
+ echo "your-model-id" | npm create squirrel-opencode-harness --stdin
277
312
  ```
278
313
 
279
314
  ### 语言选择
@@ -330,13 +365,38 @@ create-squirrel-opencode-harness "模型id" --lang zh
330
365
  └── sprint-status-template.md
331
366
  ```
332
367
 
368
+ ## 后续步骤(安装后)
369
+
370
+ 脚手架搭建完成后,按以下步骤开始工作:
371
+
372
+ ### 1. 启动 Opencode
373
+
374
+ ```bash
375
+ # 在运行脚手架的同一目录
376
+ opencode
377
+ ```
378
+
379
+ ### 2. 切换到 Harness Agent
380
+
381
+ - 按 **Tab** 键循环切换可用 agent
382
+ - 选择 **`harness`** agent - 这是您与 AI 协作的主要界面
383
+ - ⚠️ **重要**:请始终使用 `harness` agent 进行交流。**不要**直接使用 `planner`、`generator` 或 `evaluator` - harness 会自动协调这些 agent。
384
+
385
+ ### 3. 开始您的第一个 Sprint
386
+
387
+ ```
388
+ 您:我想构建一个待办事项应用
389
+
390
+ Harness: [将创建 sprint 合同并引导您完成整个过程]
391
+ ```
392
+
333
393
  ## 使用示例
334
394
 
335
395
  ### 示例 1:快速开始
336
396
 
337
397
  ```bash
338
- # 使用 npm init(无需安装)
339
- npm init squirrel-opencode-harness -- "openai/gpt-4"
398
+ # 使用 npm create(无需安装)
399
+ npm create squirrel-opencode-harness "openai/gpt-4"
340
400
 
341
401
  # 或使用 npx
342
402
  npx create-squirrel-opencode-harness "openai/gpt-4"
@@ -345,7 +405,7 @@ npx create-squirrel-opencode-harness "openai/gpt-4"
345
405
  ### 示例 2:中文交互模式
346
406
 
347
407
  ```bash
348
- npm init squirrel-opencode-harness -- --interactive --lang zh
408
+ npm create squirrel-opencode-harness --interactive --lang zh
349
409
 
350
410
  # 或使用 npx
351
411
  npx create-squirrel-opencode-harness --interactive --lang zh
@@ -355,7 +415,7 @@ npx create-squirrel-opencode-harness --interactive --lang zh
355
415
 
356
416
  ```bash
357
417
  export MODEL_ID="anthropic/claude-3-sonnet"
358
- echo $MODEL_ID | npm init squirrel-opencode-harness -- --stdin
418
+ echo $MODEL_ID | npm create squirrel-opencode-harness --stdin
359
419
  ```
360
420
 
361
421
  ## 错误处理
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-squirrel-opencode-harness",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Scaffold squirrel opencode harness into .opencode directory",
5
5
  "main": "dist/cli.js",
6
6
  "type": "module",