@jiangzhx/adcli 0.1.3 → 0.1.4
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 +37 -1
- package/dist/cli.js +1102 -105
- package/docs/commands.md +192 -4
- package/package.json +14 -5
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ adcli prompt
|
|
|
82
82
|
| 命令 | 作用 | 默认输出 |
|
|
83
83
|
| --- | --- | --- |
|
|
84
84
|
| `adcli oceanengine auth <token>` | 保存巨量引擎 access token | 保存结果 |
|
|
85
|
-
| `adcli oceanengine advertiser list` | 拉取当前 token 授权的广告主列表 |
|
|
85
|
+
| `adcli oceanengine advertiser list` | 拉取当前 token 授权的广告主列表 | `advertiser_id`、`name` |
|
|
86
86
|
| `adcli oceanengine project list --advertiser-id <id>` | 拉取广告主下的项目列表 | `project_id`、`name` |
|
|
87
87
|
| `adcli oceanengine promotion list --advertiser-id <id>` | 拉取广告主下的广告列表 | `promotion_id`、`name` |
|
|
88
88
|
|
|
@@ -100,6 +100,28 @@ token 优先级为 `--access-token`、`OCEANENGINE_ACCESS_TOKEN`、本地保存
|
|
|
100
100
|
本地 token 会保存到同一个 AdCLI 缓存目录,例如 macOS 上是 `~/Library/Caches/adcli/oceanengine.json`。
|
|
101
101
|
巨量 `project/list` 默认不返回已删除项目;需要包含已删除时传 `--filtering '{"status":"PROJECT_STATUS_ALL"}'`。
|
|
102
102
|
|
|
103
|
+
调用腾讯广告 SDK。命令名按腾讯广告 v3 API 资源定义,`--advertiser-id` 可作为 `--account-id` 的别名:
|
|
104
|
+
|
|
105
|
+
| 命令 | 作用 | 默认输出 |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| `adcli tencent-ads auth <token>` | 保存腾讯广告 access token | 保存结果 |
|
|
108
|
+
| `adcli tencent-ads advertiser list` | 拉取账号列表 | `account_id`、`name` |
|
|
109
|
+
| `adcli tencent-ads advertiser get --account-id <id>` | 拉取单个账号详情 | `account_id`、`name` |
|
|
110
|
+
| `adcli tencent-ads adgroup list --account-id <id>` | 拉取账号下的营销单元列表 | `adgroup_id`、`name` |
|
|
111
|
+
| `adcli tencent-ads dynamic-creative list --account-id <id>` | 拉取账号下的创意列表 | `dynamic_creative_id`、`name` |
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
adcli tencent-ads auth <token>
|
|
115
|
+
adcli tencent-ads advertiser list --json
|
|
116
|
+
adcli tencent-ads advertiser get --account-id <account_id> --json
|
|
117
|
+
adcli tencent-ads adgroup list --account-id <account_id> --page 1 --page-size 20
|
|
118
|
+
adcli tencent-ads dynamic-creative list --account-id <account_id> --filtering '{"adgroup_id":"<adgroup_id>"}'
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
token 优先级为 `--access-token`、`TENCENT_ADS_ACCESS_TOKEN`、本地保存的 token。
|
|
122
|
+
`advertiser list` 对齐 fujian,走 `organization_account_relation/get`;`advertiser get` 才走 `advertiser/get`。
|
|
123
|
+
腾讯广告 CLI 不做跨平台层级别名,`adgroup` 对应 v3.0 `adgroups/get`,`dynamic-creative` 对应 v3.0 `dynamic_creatives/get`。资源过滤统一传 `--filtering` JSON。
|
|
124
|
+
|
|
103
125
|
完整命令说明见 [docs/commands.md](docs/commands.md)。
|
|
104
126
|
|
|
105
127
|
## 搜索索引缓存
|
|
@@ -149,6 +171,18 @@ bun run build
|
|
|
149
171
|
bun run build:llms all
|
|
150
172
|
```
|
|
151
173
|
|
|
174
|
+
采集导航树未收录但可直达的单个官方文档:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
bun run ingest:url https://open.oceanengine.com/labels/7/docs/<doc_id>
|
|
178
|
+
bun run ingest:url https://open.oceanengine.com/labels/7/docs/<doc_id> --platform oceanengine
|
|
179
|
+
bun run build:llms --url https://open.oceanengine.com/labels/7/docs/<doc_id>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`ingest:url` 会从 URL 自动识别平台并从页面解析标题,不支持手动传标题。
|
|
183
|
+
|
|
184
|
+
`build:llms --url` 只重写该 URL 对应的 Markdown 文档,并更新平台索引、manifest、`llms` 和搜索索引。
|
|
185
|
+
|
|
152
186
|
只重建搜索索引:
|
|
153
187
|
|
|
154
188
|
```bash
|
|
@@ -185,4 +219,6 @@ recipes/
|
|
|
185
219
|
-> public/
|
|
186
220
|
```
|
|
187
221
|
|
|
222
|
+
`discover:sources` 的 recipe 文件是平台级配置:顶层写一次 `platform`,多个发现来源放在 `sources` 数组。`recipes/oceanengine-open-platform-docs.json` 同时包含官方导航树 discovery 和飞书文档 URL 清单 discovery,维护时跑同一个文件即可。飞书文档来源依赖 `@larksuite/cli` 提供的 `lark-cli`;`bun install` 会安装它,首次使用前需要完成 `lark-cli config init --new` 和 `lark-cli auth login --recommend`。
|
|
223
|
+
|
|
188
224
|
更多文档包说明见 [docs/llms.md](docs/llms.md)。
|