@drip-apex/apex-cli 0.6.3 → 0.8.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/AGENTS.md +20 -3
- package/README.md +55 -2
- package/dist/cli.js +1525 -345
- package/package.json +1 -1
- package/skills/apex-cli/SKILL.md +11 -2
package/AGENTS.md
CHANGED
|
@@ -24,7 +24,6 @@ Use `apex` as the canonical command name. `drip` is a compatibility alias.
|
|
|
24
24
|
"did you mean" hints — those are stderr diagnostics for humans; machine
|
|
25
25
|
callers resolve names via `apex schema --json`.
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
## Zero-Experiment Shop Bootstrap
|
|
29
28
|
|
|
30
29
|
CLI-only bootstrap is supported for a fresh shop before any experiments exist.
|
|
@@ -50,7 +49,7 @@ the first writes: `apex experiments create`, `apex goals create`,
|
|
|
50
49
|
- Missing auth: run `apex login` interactively, or set `APEX_API_KEY`.
|
|
51
50
|
- Headless login: pass `--api-key` or set `APEX_API_KEY`; `DRIP_API_KEY` remains a compatibility fallback.
|
|
52
51
|
- Do not wait for prompts in CI or agent runs. If a command returns exit `4`, rerun with the exact flag named in the JSON error details only after checking the plan or destructive action.
|
|
53
|
-
- Apply invalidates QA: inspect `apex experiments plan`, then rerun apply with `--
|
|
52
|
+
- Apply invalidates QA: inspect `apex experiments plan`, then rerun apply with `--accept-qa-invalidation` if intended.
|
|
54
53
|
- Stale workspace or filesystem: pull fresh files, reapply your edits, and plan again.
|
|
55
54
|
- Server limit errors: read the JSON error details; Apex includes server-owned limits when available.
|
|
56
55
|
|
|
@@ -71,7 +70,6 @@ the first writes: `apex experiments create`, `apex goals create`,
|
|
|
71
70
|
- Do not bypass the variation artifact persistence path with direct API writes.
|
|
72
71
|
- Keep generated evidence outside `qa.json`; attach it through QA commands.
|
|
73
72
|
|
|
74
|
-
|
|
75
73
|
## Project code
|
|
76
74
|
|
|
77
75
|
```sh
|
|
@@ -98,3 +96,22 @@ A successful write returns `saved`, its diff, backup path, current version, writ
|
|
|
98
96
|
and precompile result. A failed precompile is a saved-write warning. All warnings remain
|
|
99
97
|
in JSON and are also written to stderr. User keys resolve domains or pin UUID context;
|
|
100
98
|
shop keys must match the requested identity before any backup or write.
|
|
99
|
+
|
|
100
|
+
Classification uses `--counting-type standard|setup_test|aa_test|non_program` on
|
|
101
|
+
`apex experiments create` (default `standard`) and `apex experiments update`.
|
|
102
|
+
Classification writes are draft-only. In pulled `experiment.json`, `experimentType`
|
|
103
|
+
and `countingType` equal `delivery_type` and `counting_type` from
|
|
104
|
+
`apex experiments get --json`. Omitting or setting `countingType` to null preserves
|
|
105
|
+
the stored value. Classification edits invalidate QA approval; paused and running
|
|
106
|
+
experiments reject these metadata changes.
|
|
107
|
+
|
|
108
|
+
Experiment references accept an ID, slug, or test key (for example `BIO-085`). Test keys resolve within the selected shop; use `--shop <shop-id>` to change it. Bare lowercase references remain slugs.
|
|
109
|
+
|
|
110
|
+
Filesystem apply preserves authored local bytes by default. Use
|
|
111
|
+
`apex experiments apply <folder> --sync` to refresh them from stored server bytes.
|
|
112
|
+
The receipt's `files` contains SHA-256 digests for every pull path; `synced` reports
|
|
113
|
+
whether a full refresh succeeded. Server-owned QA and launch files are healed.
|
|
114
|
+
Create/get return `dashboard_url`; apply returns `dashboardUrl`. These links
|
|
115
|
+
switch the signed-in dashboard user's active shop before opening the experiment.
|
|
116
|
+
|
|
117
|
+
Filesystem apply caches uploaded asset URLs by byte SHA-256 in `.apex/experiment-filesystem.json`, so unchanged images reuse their URL across applies without rewriting authored files.
|
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ including every subcommand, argument, option, and alias.
|
|
|
127
127
|
- `apex webhooks` — manage shop webhooks.
|
|
128
128
|
- `apex simulate` — simulate data-layer triggers without emitting events.
|
|
129
129
|
- `apex experiments` — create, inspect, operate, and synchronize experiments.
|
|
130
|
-
Use `apex experiments screenshots <id-or-slug>` to force-assign every capture, including control, to its variation server-side for deterministic screenshots. The command attaches terminal jobs to the QA run by default; use `--no-attach-qa` to opt out. Choose devices with `--devices`, filter treatments with `--variations`, and use `--json` for the signed result payload. Use `apex experiments qa evidence` with `--job`, repeatable `--file`, or `--records` to write QA evidence directly.
|
|
130
|
+
Use `apex experiments screenshots <id-or-slug>` to force-assign every capture, including control, to its variation server-side for deterministic screenshots. Resume a job that outlives the CLI timeout with `--job <id>`; polling continues without creating another job, and the stored job's devices and variations win, so `--devices`/`--variations` are ignored (the CLI warns). The command attaches terminal jobs to the QA run by default; use `--no-attach-qa` to opt out. Choose devices with `--devices`, filter treatments with `--variations`, and use `--json` for the signed result payload. Use `apex experiments qa evidence` with `--job`, repeatable `--file`, or `--records` to write QA evidence directly.
|
|
131
131
|
- `apex push` — synchronize `.drip.config.ts` with Apex.
|
|
132
132
|
- `apex preview` — open a variation QA preview.
|
|
133
133
|
- `apex roadmap` — consume approved roadmap ideas and handoffs.
|
|
@@ -178,6 +178,41 @@ means it is an `apex workspace checkout/status/publish` workspace. Keep the two
|
|
|
178
178
|
formats in different folders; when the wrong command is run, Apex points to the
|
|
179
179
|
matching status command.
|
|
180
180
|
|
|
181
|
+
## Page targeting: URL rules and Pages
|
|
182
|
+
|
|
183
|
+
Page targeting has two supported authoring paths, and both stay supported.
|
|
184
|
+
|
|
185
|
+
| Key in `targeting` | What it is |
|
|
186
|
+
| --- | --- |
|
|
187
|
+
| `url` | An array of URL rules: `{ "type": "simple" \| "regex", "pattern": "/products/*", "include": true, "matchType": "exact" \| "contains" \| "wildcard" \| "regex" }`. |
|
|
188
|
+
| `authorUrl` | Read-only, and present on every pull. The subset of `url` that an author wrote, recorded by the server; an empty array means no author-written rules. An apply ignores it and the server recomputes it. |
|
|
189
|
+
| `pages` | An array of `{ "id": "<page id>", "include": true }` references to saved Pages. |
|
|
190
|
+
| `pageRules` | Read-only. The server's expanded copy of each referenced Page, including its name and its own URL rules. |
|
|
191
|
+
| `pageMatchMode` | `"any"` (default) or `"all"` when more than one Page is referenced. |
|
|
192
|
+
|
|
193
|
+
**URL rules work without a saved Page.** `apex experiments create --source-url`
|
|
194
|
+
and a hand-written `url` array in `targeting.json` are complete targeting on
|
|
195
|
+
their own. Nothing rejects them, and no Page is required.
|
|
196
|
+
|
|
197
|
+
**An included Page decides where the test runs.** At runtime the URL gate and
|
|
198
|
+
the page-rules gate must BOTH match, but the URL gate is an OR over the whole
|
|
199
|
+
expanded `url` list, and a Page referenced with `"include": true` copies that
|
|
200
|
+
Page's own include rules into `url`. A visitor on the Page therefore passes the
|
|
201
|
+
URL gate through the derived copy even when no authored include rule matches,
|
|
202
|
+
so while an included Page is referenced your authored INCLUDE rules add no
|
|
203
|
+
pages. A Page referenced with `"include": false` contributes only an exclude
|
|
204
|
+
rule, so it can only veto and your authored INCLUDE rules still provide the
|
|
205
|
+
positive match. Authored EXCLUDE rules always apply, and detaching an included
|
|
206
|
+
Page gives the authored rules the decision back.
|
|
207
|
+
|
|
208
|
+
`apex experiments get` prints the result of those two rules as one
|
|
209
|
+
`Targeting:` line, in the same words the dashboard Setup tab uses, for example
|
|
210
|
+
`2 URL rules (no saved Page)` or `Cart page and 1 URL rule`.
|
|
211
|
+
|
|
212
|
+
In a pulled `targeting.json`, `url` is the expanded rule set and `authorUrl` is
|
|
213
|
+
the authored subset, always present. Edit `url` and `pages`; treat `authorUrl`
|
|
214
|
+
and `pageRules` as output.
|
|
215
|
+
|
|
181
216
|
## Push config format
|
|
182
217
|
|
|
183
218
|
Run `apex push -c <config>` to load a JavaScript or TypeScript config. The
|
|
@@ -233,7 +268,6 @@ Read the CLI reference on the docs site:
|
|
|
233
268
|
|
|
234
269
|
Maintainers: see the [CLI release runbook](../../docs/cli-releases.md).
|
|
235
270
|
|
|
236
|
-
|
|
237
271
|
## Project code
|
|
238
272
|
|
|
239
273
|
```sh
|
|
@@ -260,3 +294,22 @@ A successful write returns `saved`, its diff, backup path, current version, writ
|
|
|
260
294
|
and precompile result. A failed precompile is a saved-write warning. All warnings remain
|
|
261
295
|
in JSON and are also written to stderr. User keys resolve domains or pin UUID context;
|
|
262
296
|
shop keys must match the requested identity before any backup or write.
|
|
297
|
+
|
|
298
|
+
Classification uses `--counting-type standard|setup_test|aa_test|non_program` on
|
|
299
|
+
`apex experiments create` (default `standard`) and `apex experiments update`.
|
|
300
|
+
Classification writes are draft-only. In pulled `experiment.json`, `experimentType`
|
|
301
|
+
and `countingType` equal `delivery_type` and `counting_type` from
|
|
302
|
+
`apex experiments get --json`. Omitting or setting `countingType` to null preserves
|
|
303
|
+
the stored value. Classification edits invalidate QA approval; paused and running
|
|
304
|
+
experiments reject these metadata changes.
|
|
305
|
+
|
|
306
|
+
Experiment references accept an ID, slug, or test key (for example `BIO-085`). Test keys resolve within the selected shop; use `--shop <shop-id>` to change it. Bare lowercase references remain slugs.
|
|
307
|
+
|
|
308
|
+
Filesystem apply preserves authored local bytes by default. Use
|
|
309
|
+
`apex experiments apply <folder> --sync` to refresh them from stored server bytes.
|
|
310
|
+
The receipt's `files` contains SHA-256 digests for every pull path; `synced` reports
|
|
311
|
+
whether a full refresh succeeded. Server-owned QA and launch files are healed.
|
|
312
|
+
Create/get return `dashboard_url`; apply returns `dashboardUrl`. These links
|
|
313
|
+
switch the signed-in dashboard user's active shop before opening the experiment.
|
|
314
|
+
|
|
315
|
+
Filesystem apply caches uploaded asset URLs by byte SHA-256 in `.apex/experiment-filesystem.json`, so unchanged images reuse their URL across applies without rewriting authored files.
|