@drip-apex/apex-cli 0.6.0 → 0.6.2

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 CHANGED
@@ -4,7 +4,7 @@ Use `apex` as the canonical command name. `drip` is a compatibility alias.
4
4
 
5
5
  ## Canonical Loop
6
6
 
7
- 1. `apex experiments pull <id-or-slug> --dir <folder>`
7
+ 1. `apex experiments pull <id-or-slug> --out <folder>`
8
8
  2. Edit only supported files in the pulled folder.
9
9
  3. `apex experiments plan <folder> --json`
10
10
  4. `apex experiments apply <folder> --json`
@@ -47,15 +47,25 @@ the first writes: `apex experiments create`, `apex goals create`,
47
47
 
48
48
  ## Recovery
49
49
 
50
- - Missing auth: run `apex login` interactively, or set `DRIP_API_KEY`.
51
- - Headless login: pass `--api-key` or set `DRIP_API_KEY`; do not wait for prompts.
50
+ - Missing auth: run `apex login` interactively, or set `APEX_API_KEY`.
51
+ - Headless login: pass `--api-key` or set `APEX_API_KEY`; `DRIP_API_KEY` remains a compatibility fallback.
52
52
  - 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
53
  - Apply invalidates QA: inspect `apex experiments plan`, then rerun apply with `--force` if intended.
54
54
  - Stale workspace or filesystem: pull fresh files, reapply your edits, and plan again.
55
55
  - Server limit errors: read the JSON error details; Apex includes server-owned limits when available.
56
56
 
57
+ ## Platform Shop Administration
58
+
59
+ - `apex admin shops archive <shopId>` archives a shop; headless callers must
60
+ inspect exit `4` and rerun the supplied `--force` command only when intended.
61
+ - `apex admin shops restore <shopId>` restores an archived shop. Restoration
62
+ does not re-enable delivery; the runtime kill switch remains authoritative.
63
+ - Both commands require a platform user API key. Organization and shop keys
64
+ are intentionally insufficient.
65
+
57
66
  ## Filesystem Rules
58
67
 
68
+ - Formatting is enforced by Biome (`npm run format`); do not hand-wrap code.
59
69
  - Treat `.apex/` as CLI-owned metadata.
60
70
  - Edit experiment files, variation code, metrics, and targeting only through supported paths.
61
71
  - Do not bypass the variation artifact persistence path with direct API writes.
package/README.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Apex CLI
2
2
 
3
+ ## Purchase-capture verification
4
+
5
+ The CLI exposes a read-only, publication-anchored purchase verification battery:
6
+
7
+ ```bash
8
+ apex shops doctor --check purchase_capture
9
+ apex tracking verify --event-type goal,conversion,purchase,checkout_completed,order_created --minutes 10080
10
+ apex install check --shop-id "$APEX_SHOP_ID"
11
+ ```
12
+
13
+ `purchase_capture` reports `OK`, `DARK`, or `NO_DATA`; a young window or unknown historical cadence
14
+ is `NO_DATA`, never a healthy result. Tracking verification renders compact event-property previews
15
+ in human mode and preserves complete properties in `--json`. Install checks report the served
16
+ `dataLayerTriggers` count and whether an enabled revenue trigger exists.
17
+
3
18
  ## Authentication and context
4
19
 
5
20
  Run `apex login` once to authenticate your account. Interactive login opens
@@ -16,7 +31,7 @@ stdout. Flags and environment variables are explicit choices and stay silent.
16
31
  JSON envelopes echo the effective org, shop, and credential kind.
17
32
 
18
33
  Automation should continue injecting a narrow shop key per process with
19
- `DRIP_API_KEY`; it takes precedence over a stored user credential and does not
34
+ `APEX_API_KEY`; it takes precedence over a stored user credential and does not
20
35
  change the stored login. Use `apex login --api-key apx_uk_...` for a headless
21
36
  account login or `apex login --api-key apx_...` to store a shop key. The old
22
37
  `apex login --user` spelling is a deprecated alias for `apex login`.
@@ -42,7 +57,7 @@ headless environments, use an existing API key:
42
57
 
43
58
  ```bash
44
59
  apex login --api-key apx_your_key_here
45
- DRIP_API_KEY=apx_your_key_here apex experiments list --json
60
+ APEX_API_KEY=apx_your_key_here apex experiments list --json
46
61
  ```
47
62
 
48
63
  ## Common usage
@@ -57,6 +72,8 @@ apex experiments pull <id-or-slug> --out ./my-test
57
72
  apex experiments plan ./my-test --json
58
73
  apex experiments apply ./my-test --json
59
74
  apex experiments qa status ./my-test --json
75
+ apex experiments qa evidence ./my-test --file ./desktop.png --device desktop
76
+ apex experiments qa evidence <id-or-slug> --job <screenshot-job-id>
60
77
  apex experiments screenshots <id-or-slug> --out ./screenshots
61
78
 
62
79
  apex workspace checkout <experimentId> --variation <variationId> --out ./workspace
@@ -83,15 +100,30 @@ including every subcommand, argument, option, and alias.
83
100
  - `apex login` — authenticate with a shop or user API key.
84
101
  - `apex logout` — remove stored credentials.
85
102
  - `apex whoami` — inspect the current credential and its validity.
103
+ - `apex use` — select the current organization and shop context.
86
104
  - `apex account` — manage the current user profile.
87
105
  - `apex keys` — manage shop API keys.
88
106
  - `apex org` — inspect and manage the organization.
89
- - `apex team` — manage organization members and invitations.
107
+ - `apex team` — manage shop-scoped members and invitations.
90
108
 
91
109
  ### Experiments and delivery
92
110
 
111
+ - `apex consent` — manage consent gating.
112
+ - `apex triggers` — manage data-layer triggers and temporary setup capture.
113
+ - `apex triggers get --shop <domain-or-id>` — read the identified shop's runtime triggers.
114
+ - `apex triggers set` — replace the shop's runtime triggers from a JSON file.
115
+ - `apex triggers propose` — propose candidate triggers from a discovery report.
116
+ - `apex triggers apply-recipe` — apply a server-owned trigger recipe.
117
+ - `apex triggers enable-capture` — enable temporary setup capture.
118
+ - `apex triggers disable-capture` — disable setup capture and clear its expiry.
119
+ - `apex domains` — manage install domains.
120
+ - `apex handover` — manage cross-domain identity handover.
121
+ - `apex install` — generate storefront installation snippets.
122
+ - `apex funnels` — manage analytics funnels.
123
+ - `apex webhooks` — manage shop webhooks.
124
+ - `apex simulate` — simulate data-layer triggers without emitting events.
93
125
  - `apex experiments` — create, inspect, operate, and synchronize experiments.
94
- Use `apex experiments screenshots <id-or-slug>` to force-assign every capture, including control, to its variation server-side for deterministic screenshots; choose devices with `--devices`, filter treatments with `--variations`, and use `--json` for the signed result payload.
126
+ 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.
95
127
  - `apex push` — synchronize `.drip.config.ts` with Apex.
96
128
  - `apex preview` — open a variation QA preview.
97
129
  - `apex roadmap` — consume approved roadmap ideas and handoffs.
@@ -121,11 +153,18 @@ including every subcommand, argument, option, and alias.
121
153
  - `apex assets` — manage uploaded assets.
122
154
  - `apex landing-pages` — discover landing pages.
123
155
  - `apex brand` — manage brand context.
124
- - `apex sos` — run operational diagnostics.
125
156
  - `apex shops` — manage shops and active-shop context.
126
157
  - `apex skills` — inspect agent skill guidance.
127
- - `apex admin` — run authorized administrative operations.
128
158
  - `apex schema` — emit the machine-readable CLI schema.
159
+ - `apex discover` — read observed tracking shapes or mine a public GTM container.
160
+
161
+ Platform-administrator shop commands are intentionally outside the public
162
+ command inventory:
163
+
164
+ | Command | Purpose |
165
+ | --- | --- |
166
+ | `apex admin shops archive <shopId>` | Archive a shop and disable Apex delivery; use `--force` in non-interactive environments. |
167
+ | `apex admin shops restore <shopId>` | Restore an archived shop while leaving its runtime kill switch unchanged. |
129
168
 
130
169
  ## Which local format am I in?
131
170