@adsuploader/cli 0.1.8 → 0.2.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 +2 -0
- package/SKILL.md +39 -0
- package/dist/cli.cjs +689 -240
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ This package includes a `SKILL.md` file that describes every command and option
|
|
|
37
37
|
| `ads login` | Authenticate via browser |
|
|
38
38
|
| `ads accounts` | List ad accounts |
|
|
39
39
|
| `ads account <id>` | Set default account |
|
|
40
|
+
| `ads pages` | List Facebook Pages available for profile overrides |
|
|
40
41
|
| `ads campaigns` | List campaigns |
|
|
41
42
|
| `ads campaign <id>` | Show ad sets in a campaign |
|
|
42
43
|
| `ads adset <id>` | Show ads in an ad set |
|
|
@@ -44,6 +45,7 @@ This package includes a `SKILL.md` file that describes every command and option
|
|
|
44
45
|
| `ads presets` | List saved presets |
|
|
45
46
|
| `ads presets:save --from-ad <id> --name <name>` | Save an existing ad as an API preset |
|
|
46
47
|
| `ads upload <files...>` | Upload images and videos |
|
|
48
|
+
| `ads upload --retry-failed [batchId]` | Retry failed files into the same upload batch |
|
|
47
49
|
| `ads uploads` | List recent upload batches |
|
|
48
50
|
| `ads create spec.json` | Create ads from spec |
|
|
49
51
|
| `ads create:preview spec.json` | Dry run |
|
package/SKILL.md
CHANGED
|
@@ -41,10 +41,21 @@ Every ad creation follows three steps:
|
|
|
41
41
|
```bash
|
|
42
42
|
ads upload hero.jpg banner.mp4
|
|
43
43
|
ads upload ./my-creatives/ # entire directory
|
|
44
|
+
ads upload --retry-failed # retry latest failed batch
|
|
45
|
+
ads upload --retry-failed batch_abc123
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
Returns a **batch ID** (e.g. `batch_abc123`) — you'll need this for the spec file. Files are uploaded directly to the selected ad account's Facebook media library, so the batch ID is tied to that account.
|
|
47
49
|
|
|
50
|
+
Files are staged in parallel and transient network failures are retried automatically. Tune the defaults if needed:
|
|
51
|
+
|
|
52
|
+
| Upload option | Description |
|
|
53
|
+
|---------------|-------------|
|
|
54
|
+
| `--concurrency <n>` | Parallel staging uploads, 1-6 (default: 4) |
|
|
55
|
+
| `--upload-timeout <ms>` | Per-file R2 upload timeout (default: 120000) |
|
|
56
|
+
| `--api-timeout <ms>` | API request timeout (default: 60000) |
|
|
57
|
+
| `--retry-failed [batchId]` | Retry failed files into the same batch; defaults to the latest saved failed batch |
|
|
58
|
+
|
|
48
59
|
### 2. Preview (dry run)
|
|
49
60
|
|
|
50
61
|
```bash
|
|
@@ -78,6 +89,7 @@ Ads are created **ACTIVE** by default. Use `--status PAUSED` to create them paus
|
|
|
78
89
|
|---------|-------------|
|
|
79
90
|
| `accounts` | List ad accounts |
|
|
80
91
|
| `account <id>` | Set default account |
|
|
92
|
+
| `pages` | List Facebook Pages available for `--page` / `profile.pageId` |
|
|
81
93
|
| `campaigns` | List active campaigns (`--status all` for all, `--search <text>` to filter) |
|
|
82
94
|
| `campaign <id>` | Show ad sets in a campaign |
|
|
83
95
|
| `adsets --campaign <id>` | List ad sets (supports `--search`, `--status`) |
|
|
@@ -115,6 +127,9 @@ Ads are created **ACTIVE** by default. Use `--status PAUSED` to create them paus
|
|
|
115
127
|
| `--pause-at <level>` | Pause level: `ad` (default), `adSet`, or `campaign` |
|
|
116
128
|
| `--daily-budget <amount>` | Override daily budget (currency units) |
|
|
117
129
|
| `--bid-amount <amount>` | Override bid/cost cap (currency units) |
|
|
130
|
+
| `--page <id>` | Override the Facebook Page ID used by created ads |
|
|
131
|
+
| `--instagram <id>` | Override the Instagram account ID used by created ads |
|
|
132
|
+
| `--threads <id>` | Override the Threads profile ID used by created ads |
|
|
118
133
|
| `--text-file <path>` | Load text config from a JSON file |
|
|
119
134
|
| `--expanded` | Show full headline, primary text, and description values in previews |
|
|
120
135
|
|
|
@@ -165,6 +180,30 @@ When using `copyFromAd`, provide the upload batch and optionally campaign/ad set
|
|
|
165
180
|
}
|
|
166
181
|
```
|
|
167
182
|
|
|
183
|
+
### Profile Options
|
|
184
|
+
|
|
185
|
+
By default, created ads inherit the Facebook Page, Instagram account, and Threads profile from the template ad or preset. Override them with `profile`:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"copyFromAd": "120233848667930472",
|
|
190
|
+
"uploadId": "batch_abc123",
|
|
191
|
+
"profile": {
|
|
192
|
+
"pageId": "123456789012345",
|
|
193
|
+
"instagramId": "17841400000000000",
|
|
194
|
+
"threadsId": "987654321098765"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
You can also use flags:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
ads create:preview spec.json --page 123456789012345 --instagram 17841400000000000 --threads 987654321098765
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
If you override only `pageId`, the CLI/API does not carry over the template ad's Instagram or Threads IDs, because they may belong to the old page. Add `instagramId` and `threadsId` explicitly when you want them attached. Run `ads pages` to list available Facebook Page IDs for `--page`; use the web app's Profile Options selector or Meta Business settings for Instagram/Threads IDs when needed. Multi-campaign per-campaign profile overrides are not supported in CLI specs yet.
|
|
206
|
+
|
|
168
207
|
### Campaign Structure
|
|
169
208
|
|
|
170
209
|
**Single campaign** (default): ads go into the template ad's campaign, or a new campaign if `campaign.name` is provided.
|