@drip-apex/apex-cli 0.15.3 → 0.15.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/AGENTS.md +16 -10
- package/README.md +45 -23
- package/dist/cli.js +1363 -347
- package/package.json +1 -1
- package/skills/apex-cli/SKILL.md +5 -0
package/AGENTS.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Use `apex` as the canonical command name. `drip` is a compatibility alias.
|
|
4
4
|
|
|
5
|
+
Install the CLI once with `npm install -g @drip-apex/apex-cli` and call `apex`; `apex --help` and `apex schema --json` need no network. Do not run `npx @drip-apex/apex-cli@latest` per command: npx contacts the npm registry before the CLI starts and hangs with no output when the registry is slow or blocked.
|
|
6
|
+
|
|
5
7
|
## Choosing a workflow
|
|
6
8
|
|
|
7
9
|
The default loop for agents building or editing a test is `apex experiments pull`, edit supported files, `apex experiments plan`, `apex experiments apply`, then `apex experiments qa status`.
|
|
@@ -58,6 +60,7 @@ the first writes: `apex experiments create`, `apex goals create`,
|
|
|
58
60
|
- `3`: validation failure
|
|
59
61
|
- `4`: confirmation required; inspect `error.details.retry`
|
|
60
62
|
- `5`: conflict, including stale filesystem state where detected
|
|
63
|
+
- `6`: a check command reported a definite failing verdict
|
|
61
64
|
|
|
62
65
|
## Recovery
|
|
63
66
|
|
|
@@ -133,11 +136,13 @@ Filesystem apply caches uploaded asset URLs by byte SHA-256 in `.apex/experiment
|
|
|
133
136
|
|
|
134
137
|
## Error recovery and update notices
|
|
135
138
|
|
|
139
|
+
Every JSON envelope may carry update and warnings. If update.required is true, or a warning has code cli_upgrade_required, first check whether the command succeeded (ok is true). If it succeeded, do not rerun it: run apex upgrade (or the command in update.command) before any further work. If it failed with the upgrade-required error (code cli_upgrade_required), run apex upgrade, then rerun the same command. Tell your user you upgraded. If only cli_update_available is present, finish the current task, then upgrade before the next one.
|
|
140
|
+
|
|
136
141
|
JSON errors keep the numeric `error.code` exit code and add `error.reason`,
|
|
137
142
|
`error.next_steps` (an array of `{ command, why }`), and optional `error.request_id`.
|
|
138
143
|
The request ID comes from `x-request-id`, falling back to `x-vercel-id` (the Apex app) and then `cf-ray`; include it
|
|
139
144
|
when reporting an API failure. API-provided reason codes are preserved verbatim.
|
|
140
|
-
Otherwise reasons are `auth_required`, `auth_forbidden`, `shop_context_required`,
|
|
145
|
+
Otherwise reasons are `auth_required`, `auth_forbidden`, `shop_context_required`, `shop_context_mismatch`, `install_check_failed`,
|
|
141
146
|
`validation_failed`, `confirmation_required`, `conflict`, `not_found`,
|
|
142
147
|
`rate_limited`, `network_timeout`, `network_connect_timeout`, `network_dns`,
|
|
143
148
|
`network_refused`, `network_reset`, `network_tls`, `network_unknown`,
|
|
@@ -153,12 +158,13 @@ command: authentication failures exit **2** (previously 4), invalid local input
|
|
|
153
158
|
**3**, conflict **5**, anything else **1**). The `TRIGGERS_AUTH`, `TRIGGERS_CONFIG_ABSENT` and `TRIGGERS_NO_DATA`
|
|
154
159
|
verdict prefixes are unchanged, so scripts can key on them instead of exit codes.
|
|
155
160
|
|
|
156
|
-
|
|
157
|
-
`
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
`APEX_NO_UPDATE_CHECK=1`
|
|
161
|
+
Every JSON envelope may carry `update` and `warnings`. The update object includes
|
|
162
|
+
`current`, `latest`, optional `minimum`, `required`, `breaking`, `command`, and
|
|
163
|
+
`notes_url`; warnings use `{ code, message }`. The exact install command is
|
|
164
|
+
`npm install -g @drip-apex/apex-cli@latest`, and `apex upgrade` runs it (`--dry-run`
|
|
165
|
+
only prints it). Set `APEX_NPM_BIN` to choose the npm binary.
|
|
166
|
+
|
|
167
|
+
The npm latest version is cached for 24 hours (failed lookups for one hour). Server
|
|
168
|
+
latest/minimum policy is cached for seven days, so offline commands still enforce a
|
|
169
|
+
known floor. `APEX_NO_UPDATE_CHECK=1` disables the npm lookup and optional update
|
|
170
|
+
notice, but never hides a required server-floor upgrade.
|
package/README.md
CHANGED
|
@@ -25,14 +25,17 @@ apex install check --shop-id "$APEX_SHOP_ID"
|
|
|
25
25
|
is `NO_DATA`, never a healthy result. Tracking verification renders compact event-property previews
|
|
26
26
|
in human mode and preserves complete properties in `--json`. Install checks report the served
|
|
27
27
|
`dataLayerTriggers` count and whether an enabled revenue trigger exists.
|
|
28
|
+
`--shop-id` selects the shop for every install-check API request. A definite install-check or doctor failure exits `6`; install-check JSON lists `error.details.failed_checks`.
|
|
28
29
|
|
|
29
30
|
## Authentication and context
|
|
30
31
|
|
|
31
32
|
Run `apex login` once to authenticate your account. Interactive login opens
|
|
32
33
|
the browser and then lets you select an organization and shop. Inspect the
|
|
33
34
|
credential and every accessible context with `apex whoami`, and switch the
|
|
34
|
-
stored default with `apex use <org>[/<shop>]`
|
|
35
|
-
prefixes are accepted).
|
|
35
|
+
stored default with `apex use <org>[/<shop>]` or `apex use --org <org> --shop
|
|
36
|
+
<shop>` (IDs and unambiguous name prefixes are accepted). When authentication
|
|
37
|
+
comes only from an environment key, `apex use` returns `context_not_persistable`
|
|
38
|
+
with the `DRIP_ORG` and `DRIP_SHOP` values to export instead of writing a credential file.
|
|
36
39
|
|
|
37
40
|
Every command also accepts `--org <id>` and `--shop <id>`. Their precedence is
|
|
38
41
|
command flag, then `DRIP_ORG` / `DRIP_SHOP`, then the context saved by
|
|
@@ -56,6 +59,8 @@ evidence, tracking checks, and agent handoffs.
|
|
|
56
59
|
npm install -g @drip-apex/apex-cli
|
|
57
60
|
```
|
|
58
61
|
|
|
62
|
+
Install the CLI once, then call `apex` directly. `apex --help` and `apex schema --json` answer without network access. Do not run `npx @drip-apex/apex-cli@latest` for every command: npx asks the npm registry for the package before the CLI starts, so it prints nothing and hangs when the registry is slow or blocked, which is common in agent sandboxes. Update with `npm install -g @drip-apex/apex-cli@latest`.
|
|
63
|
+
|
|
59
64
|
## Authenticate
|
|
60
65
|
|
|
61
66
|
```bash
|
|
@@ -158,6 +163,7 @@ including every subcommand, argument, option, and alias.
|
|
|
158
163
|
- `apex logout` — remove stored credentials.
|
|
159
164
|
- `apex whoami` — inspect the current credential and its validity.
|
|
160
165
|
- `apex use` — select the current organization and shop context.
|
|
166
|
+
- `apex upgrade` — install the latest Apex CLI; `--dry-run` prints the command.
|
|
161
167
|
- `apex account` — manage the current user profile.
|
|
162
168
|
- `apex keys` — manage shop API keys.
|
|
163
169
|
- `apex org` — inspect and manage the organization.
|
|
@@ -486,7 +492,7 @@ JSON errors keep the numeric `error.code` exit code and add `error.reason`,
|
|
|
486
492
|
`error.next_steps` (an array of `{ command, why }`), and optional `error.request_id`.
|
|
487
493
|
The request ID comes from `x-request-id`, falling back to `x-vercel-id` (the Apex app) and then `cf-ray`; include it
|
|
488
494
|
when reporting an API failure. API-provided reason codes are preserved verbatim.
|
|
489
|
-
Otherwise reasons are `auth_required`, `auth_forbidden`, `shop_context_required`,
|
|
495
|
+
Otherwise reasons are `auth_required`, `auth_forbidden`, `shop_context_required`, `shop_context_mismatch`, `install_check_failed`,
|
|
490
496
|
`validation_failed`, `confirmation_required`, `conflict`, `not_found`,
|
|
491
497
|
`rate_limited`, `network_timeout`, `network_connect_timeout`, `network_dns`,
|
|
492
498
|
`network_refused`, `network_reset`, `network_tls`, `network_unknown`,
|
|
@@ -502,30 +508,46 @@ command: authentication failures exit **2** (previously 4), invalid local input
|
|
|
502
508
|
**3**, conflict **5**, anything else **1**). The `TRIGGERS_AUTH`, `TRIGGERS_CONFIG_ABSENT` and `TRIGGERS_NO_DATA`
|
|
503
509
|
verdict prefixes are unchanged, so scripts can key on them instead of exit codes.
|
|
504
510
|
|
|
505
|
-
|
|
506
|
-
`
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
`APEX_NO_UPDATE_CHECK=1`
|
|
511
|
+
Every JSON envelope may carry `update` and `warnings`. The update object includes
|
|
512
|
+
`current`, `latest`, optional `minimum`, `required`, `breaking`, `command`, and
|
|
513
|
+
`notes_url`; warnings use `{ code, message }`. The exact install command is
|
|
514
|
+
`npm install -g @drip-apex/apex-cli@latest`, and `apex upgrade` runs it (`--dry-run`
|
|
515
|
+
only prints it). Set `APEX_NPM_BIN` to choose the npm binary.
|
|
516
|
+
|
|
517
|
+
The npm latest version is cached for 24 hours (failed lookups for one hour). Server
|
|
518
|
+
latest/minimum policy is cached for seven days, so offline commands still enforce a
|
|
519
|
+
known floor. `APEX_NO_UPDATE_CHECK=1` disables the npm lookup and optional update
|
|
520
|
+
notice, but never hides a required server-floor upgrade.
|
|
514
521
|
|
|
515
522
|
## Usage telemetry
|
|
516
523
|
|
|
517
|
-
Authenticated invocations send a process invocation ID, command path, explicitly set
|
|
524
|
+
Authenticated invocations send a process invocation ID, full command path, explicitly set
|
|
518
525
|
option names (never values), JSON/TTY modes, credential kind, organization/shop IDs,
|
|
519
|
-
CLI/Node versions, platform, exit code, error class, API response count, first
|
|
520
|
-
response status/code/request ID and normalized route, and duration.
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
that
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
526
|
+
CLI/Node versions, platform, exit code, error class and code, API response count, the first
|
|
527
|
+
failed response's status/code/request ID and normalized route, and total duration. Up to the
|
|
528
|
+
first 25 API calls include their method, normalized route, status, duration, and bounded
|
|
529
|
+
`Server-Timing` header. Requests whose path contains an experiment or landing-page UUID also
|
|
530
|
+
send that UUID and its entity type; slugs are not captured.
|
|
531
|
+
|
|
532
|
+
Help commands are named `(help) <full command path>`. Parse failures are named `(parse)` and
|
|
533
|
+
send the known command path plus only a mistyped subcommand as `attempted`. Potential
|
|
534
|
+
credentials, URLs, paths, long keys, and other sensitive-looking attempted tokens are
|
|
535
|
+
redacted; positional argument values are never sent.
|
|
536
|
+
|
|
537
|
+
Agent hosts can be reported as a fixed label such as `claude-code`, `codex`, or `terminal`,
|
|
538
|
+
never as an environment value. Set `APEX_AGENT_HOST` to one of `claude-code`, `codex`,
|
|
539
|
+
`cursor`, `grok`, `gemini`, `copilot`, or `other` to override automatic detection.
|
|
540
|
+
`APEX_SESSION_ID` may supply a 1–128 character identifier containing letters, digits, dots,
|
|
541
|
+
underscores, colons, or hyphens; choose a non-secret value. When that variable is absent or
|
|
542
|
+
invalid, supported agent session IDs are SHA-256 hashed locally and only the `h_`-prefixed
|
|
543
|
+
first 32 hexadecimal characters are sent.
|
|
544
|
+
|
|
545
|
+
No argument or option values, file contents or paths, prompts, selectors, URLs, error text,
|
|
546
|
+
environment values, raw agent session IDs, or secrets are sent. Login/logout, tests, the mock
|
|
547
|
+
transport, and runs with no resolvable credentials (neither stored nor environment) skip
|
|
548
|
+
telemetry. Environment-credential runs (`APEX_API_KEY` or `DRIP_API_KEY`) are recorded with
|
|
549
|
+
credential kind `env` unless `APEX_TELEMETRY=0`. Set `APEX_TELEMETRY=0` to disable the beacon.
|
|
550
|
+
The best-effort request has an 800 ms timeout and never changes command output or exit status.
|
|
529
551
|
|
|
530
552
|
MP4 (`video/mp4`) and WebM (`video/webm`) videos are hosted directly by Apex.
|
|
531
553
|
Each version holds at most 300 files and 100 MB; each video is limited to 50 MB,
|