Skip to content

Commit 4bffa0e

Browse files
committed
docs: update artifact paths to ~/.opencli/ in docs and skills
Sync documentation with the new default output directory. Also improve resolveExploreDir error message with a hint for legacy artifact paths.
1 parent e9b9817 commit 4bffa0e

6 files changed

Lines changed: 13 additions & 10 deletions

File tree

CLI-EXPLORER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ OpenCLI 内置 Deep Explore,自动分析网站网络请求:
8686
opencli explore https://www.example.com --site mysite
8787
```
8888

89-
输出到 `.opencli/explore/mysite/`
89+
输出到 `~/.opencli/explore/mysite/`
9090

9191
| 文件 | 内容 |
9292
|------|------|
@@ -721,4 +721,4 @@ opencli synthesize mysite # 生成候选
721721
opencli verify mysite/hot --smoke # 冒烟测试
722722
```
723723

724-
生成的候选 YAML 保存在 `.opencli/explore/mysite/candidates/`,可直接复制到 `src/clis/mysite/` 并微调。
724+
生成的候选 YAML 保存在 `~/.opencli/explore/mysite/candidates/`,可直接复制到 `src/clis/mysite/` 并微调。

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ opencli generate https://example.com --goal "hot"
390390
opencli cascade https://api.example.com/data
391391
```
392392

393-
探索结果输出到 `.opencli/explore/<site>/`
393+
探索结果输出到 `~/.opencli/explore/<site>/`
394394

395395
## 常见问题排查
396396

docs/developer/ai-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Discover APIs, infer capabilities, and detect framework:
2424
opencli explore https://example.com --site mysite
2525
```
2626

27-
Outputs to `.opencli/explore/<site>/`:
27+
Outputs to `~/.opencli/explore/<site>/`:
2828
- `manifest.json` — Site metadata
2929
- `endpoints.json` — Discovered API endpoints
3030
- `capabilities.json` — Inferred capabilities

skills/opencli-explorer/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ OpenCLI 内置 Deep Explore,自动分析网站网络请求:
8686
opencli explore https://www.example.com --site mysite
8787
```
8888

89-
输出到 `.opencli/explore/mysite/`
89+
输出到 `~/.opencli/explore/mysite/`
9090

9191
| 文件 | 内容 |
9292
|------|------|
@@ -721,7 +721,7 @@ opencli synthesize mysite # 生成候选
721721
opencli verify mysite/hot --smoke # 冒烟测试
722722
```
723723

724-
生成的候选 YAML 保存在 `.opencli/explore/mysite/candidates/`,可直接复制到 `src/clis/mysite/` 并微调。
724+
生成的候选 YAML 保存在 `~/.opencli/explore/mysite/candidates/`,可直接复制到 `src/clis/mysite/` 并微调。
725725

726726
## Record Workflow
727727

@@ -758,8 +758,8 @@ opencli record "https://example.com/page" --timeout 120000
758758
# 3. 完成操作后按 Enter 停止(或等超时自动停止)
759759

760760
# 4. 查看结果
761-
cat .opencli/record/<site>/captured.json # 原始捕获
762-
ls .opencli/record/<site>/candidates/ # 候选 YAML
761+
cat ~/.opencli/record/<site>/captured.json # 原始捕获
762+
ls ~/.opencli/record/<site>/candidates/ # 候选 YAML
763763
```
764764

765765
### 页面类型与捕获预期

skills/opencli-usage/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ opencli record <url> # 录制,site name 从域名
3030
opencli record <url> --site mysite # 指定 site name
3131
opencli record <url> --timeout 120000 # 自定义超时(毫秒,默认 60000)
3232
opencli record <url> --poll 1000 # 缩短轮询间隔(毫秒,默认 2000)
33-
opencli record <url> --out .opencli/record/x # 自定义输出目录
33+
opencli record <url> --out ~/.opencli/record/x # 自定义输出目录
3434

3535
# Strategy Cascade: auto-probe PUBLIC → COOKIE → HEADER
3636
opencli cascade <api-url>

src/synthesize.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ export function resolveExploreDir(target: string): string {
139139
// Fallback: check cwd/.opencli/explore/<target> (legacy location)
140140
const cwdCandidate = path.join('.opencli', 'explore', target);
141141
if (fs.existsSync(cwdCandidate)) return cwdCandidate;
142-
throw new Error(`Explore directory not found: ${target}`);
142+
throw new Error(
143+
`Explore directory not found: ${target}. `
144+
+ 'If artifacts were created elsewhere, pass the full path.',
145+
);
143146
}
144147

145148
export function loadExploreBundle(exploreDir: string): LoadedExploreBundle {

0 commit comments

Comments
 (0)