@jiangzhx/adcli 0.1.0
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 +100 -0
- package/dist/cli.js +1383 -0
- package/dist/jiangzhx-adcli-0.1.0.tgz +0 -0
- package/docs/commands.md +209 -0
- package/package.json +54 -0
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# AdCLI
|
|
2
|
+
|
|
3
|
+
面向 IDE Agent 和 LLM 的广告平台 API 文档包。当前主线是把已采集的广告平台文档生成 `llms.txt`、`llms-full.txt` 和静态 Markdown 文档包。
|
|
4
|
+
|
|
5
|
+
项目当前是 Bun + TypeScript CLI,不使用 Next.js。
|
|
6
|
+
|
|
7
|
+
## 安装 CLI
|
|
8
|
+
|
|
9
|
+
发布到 npm 后:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
node --version
|
|
13
|
+
npm install -g @jiangzhx/adcli
|
|
14
|
+
adcli doc search "广点通 广告消耗"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
从 GitHub 安装当前版本:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g github:jiangzhx/adcli
|
|
21
|
+
adcli doc search "广告消耗"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
本地开发安装:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bun install
|
|
28
|
+
bun run build:cli
|
|
29
|
+
npm install -g .
|
|
30
|
+
adcli doc search "广告消耗"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`adcli doc search` 默认读取线上索引:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
https://adcli.jiangzhx.com/search-index.json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
本地调试可指定索引:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
adcli doc search "广告消耗" --index public/search-index.json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## 常用命令
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bun install
|
|
49
|
+
bun run build
|
|
50
|
+
bun run test
|
|
51
|
+
bun run typecheck
|
|
52
|
+
bun run lint
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`bun run build` 校验已提交的 `public/` 静态产物,适合部署环境。重新采集后本地生成发布产物使用:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bun run build:llms all
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
只基于当前 `public/` 重新生成搜索索引:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
bun run build:search-index
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
本地搜索已发布文档:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
bun run adcli doc search "广告消耗"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
完整命令清单见 [docs/commands.md](docs/commands.md)。
|
|
74
|
+
|
|
75
|
+
## 产物
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
public/llms.txt
|
|
79
|
+
public/llms-full.txt
|
|
80
|
+
public/search-index.json
|
|
81
|
+
public/{platform}/index.md
|
|
82
|
+
public/{platform}/manifest.json
|
|
83
|
+
public/{platform}/docs/{doc_id}.md
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## 数据流
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
recipes/
|
|
90
|
+
-> discover / ingest
|
|
91
|
+
-> data/sources/{platform}/{source_id}/cleaned.md # local only, not committed
|
|
92
|
+
-> build:llms
|
|
93
|
+
-> public/
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
详细说明见 [docs/llms.md](docs/llms.md)。
|
|
97
|
+
|
|
98
|
+
## 未来 MCP 服务
|
|
99
|
+
|
|
100
|
+
如果后续需要 MCP,可以在当前 Bun/TypeScript 项目中增加独立服务入口,不需要恢复 Next.js。服务只读取 `public/` 下已经发布的静态文档和 manifest。
|