@drip-apex/apex-cli 0.2.1 → 0.4.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 CHANGED
@@ -20,7 +20,21 @@ Use `apex` as the canonical command name. `drip` is a compatibility alias.
20
20
  - JSON output is a stable contract: top level is `{ ok, version, command, data | error }`.
21
21
  - Diagnostics, prompts, progress, and update notices go to stderr.
22
22
  - Do not parse human tables. Use `apex schema --json` first if you need flags.
23
- - Keep command names exact. Do not infer fuzzy suggestions.
23
+ - Keep command names exact. Do not infer or guess names from the CLI's
24
+ "did you mean" hints — those are stderr diagnostics for humans; machine
25
+ callers resolve names via `apex schema --json`.
26
+
27
+
28
+ ## Zero-Experiment Shop Bootstrap
29
+
30
+ CLI-only bootstrap is supported for a fresh shop before any experiments exist.
31
+ External tools should prove identity with the user credential only: run
32
+ `apex org get --json`, then `apex shops get <shop-id> --json` (or
33
+ `apex shops list --json` to select the shop). Do not invent separate identity
34
+ proofs or infer access from experiment reads on an empty shop. After the user
35
+ credential confirms the organization and shop, the shop credential can perform
36
+ the first writes: `apex experiments create`, `apex goals create`,
37
+ `apex workspace checkout`, and `apex workspace publish`.
24
38
 
25
39
  ## Exit Codes
26
40
 
package/README.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Apex CLI
2
2
 
3
+ ## Authentication and context
4
+
5
+ Run `apex login` once to authenticate your account. Interactive login opens
6
+ the browser and then lets you select an organization and shop. Inspect the
7
+ credential and every accessible context with `apex whoami`, and switch the
8
+ stored default with `apex use <org>[/<shop>]` (IDs and unambiguous name
9
+ prefixes are accepted).
10
+
11
+ Every command also accepts `--org <id>` and `--shop <id>`. Their precedence is
12
+ command flag, then `DRIP_ORG` / `DRIP_SHOP`, then the context saved by
13
+ `apex use`. JSON envelopes echo the effective org, shop, and credential kind.
14
+
15
+ Automation should continue injecting a narrow shop key per process with
16
+ `DRIP_API_KEY`; it takes precedence over a stored user credential and does not
17
+ change the stored login. Use `apex login --api-key apx_uk_...` for a headless
18
+ account login or `apex login --api-key apx_...` to store a shop key. The old
19
+ `apex login --user` spelling is a deprecated alias for `apex login`.
20
+
3
21
  Command-line tools for Apex experiments, draft workspaces, GitOps pushes, QA
4
22
  evidence, tracking checks, and agent handoffs.
5
23
 
@@ -28,15 +46,17 @@ DRIP_API_KEY=apx_your_key_here apex experiments list --json
28
46
 
29
47
  ```bash
30
48
  apex experiments list
49
+ apex experiments list --include-archived
31
50
  apex experiments create --name "Redirect test" --type redirect \
32
51
  --source-url "https://shop.example/products/source" \
33
52
  --destination "https://landing.example/products/treatment"
34
- apex experiments pull <id-or-slug> --dir ./my-test
53
+ apex experiments pull <id-or-slug> --out ./my-test
35
54
  apex experiments plan ./my-test --json
36
55
  apex experiments apply ./my-test --json
37
56
  apex experiments qa status ./my-test --json
57
+ apex experiments screenshots <id-or-slug> --out ./screenshots
38
58
 
39
- apex workspace checkout <experimentId> --variation <variationId> --dir ./workspace
59
+ apex workspace checkout <experimentId> --variation <variationId> --out ./workspace
40
60
  apex workspace dev ./workspace --no-open
41
61
  apex workspace publish ./workspace
42
62
 
@@ -46,6 +66,72 @@ apex schema --json
46
66
 
47
67
  Use `apex` as the canonical command name. `drip` is a compatibility alias.
48
68
 
69
+ `apex experiments list` hides archived experiments by default. Pass
70
+ `--include-archived` to include them; archived rows display their archive date
71
+ when the API provides `archived_at`.
72
+
73
+ ## Command index
74
+
75
+ Use `apex schema --json` to emit the complete machine-readable command surface,
76
+ including every subcommand, argument, option, and alias.
77
+
78
+ ### Authentication and account
79
+
80
+ - `apex login` — authenticate with a shop or user API key.
81
+ - `apex logout` — remove stored credentials.
82
+ - `apex whoami` — inspect the current credential and its validity.
83
+ - `apex account` — manage the current user profile.
84
+ - `apex keys` — manage shop API keys.
85
+ - `apex org` — inspect and manage the organization.
86
+ - `apex team` — manage organization members and invitations.
87
+
88
+ ### Experiments and delivery
89
+
90
+ - `apex experiments` — create, inspect, operate, and synchronize experiments.
91
+ 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.
92
+ - `apex push` — synchronize `.drip.config.ts` with Apex.
93
+ - `apex preview` — open a variation QA preview.
94
+ - `apex roadmap` — consume approved roadmap ideas and handoffs.
95
+ - `apex harness` — develop AB Test Harness projects with live QA sessions.
96
+ - `apex workspace` — check out, preview, and publish draft workspace files.
97
+ - `apex goals` — manage conversion and revenue goals.
98
+ - `apex flags` — manage feature flags.
99
+ - `apex personalizations` — manage personalization deliveries.
100
+ - `apex backlog` — manage experiment backlog items.
101
+ - `apex signals` — inspect research and opportunity signals.
102
+
103
+ ### Analytics, targeting, and tracking
104
+
105
+ - `apex tracking` — diagnose storefront tracking.
106
+ - `apex environments` — inspect delivery environments.
107
+ - `apex analytics` — read shop analytics.
108
+ - `apex pages` — manage page targeting resources.
109
+ - `apex segments` — manage audience segments.
110
+ - `apex exclusion-groups` — manage mutually exclusive experiment groups.
111
+ - `apex targeting` — inspect targeting evaluation and coverage.
112
+ - `apex audit-log` — inspect auditable account activity.
113
+ - `apex inbox` — use the operator inbox.
114
+
115
+ ### Shop configuration and operations
116
+
117
+ - `apex external-pixels` — manage external pixel snippets.
118
+ - `apex assets` — manage uploaded assets.
119
+ - `apex landing-pages` — discover landing pages.
120
+ - `apex brand` — manage brand context.
121
+ - `apex sos` — run operational diagnostics.
122
+ - `apex shops` — manage shops and active-shop context.
123
+ - `apex skills` — inspect agent skill guidance.
124
+ - `apex admin` — run authorized administrative operations.
125
+ - `apex schema` — emit the machine-readable CLI schema.
126
+
127
+ ## Which local format am I in?
128
+
129
+ Inspect the marker under `.apex/`: `experiment-filesystem.json` means the
130
+ folder belongs to `apex experiments pull/plan/apply`, while `session.json`
131
+ means it is an `apex workspace checkout/status/publish` workspace. Keep the two
132
+ formats in different folders; when the wrong command is run, Apex points to the
133
+ matching status command.
134
+
49
135
  ## Full documentation
50
136
 
51
137
  Read the CLI reference on the docs site: