@drip-apex/apex-cli 0.1.0 → 0.2.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 +48 -0
- package/LICENSE +21 -0
- package/README.md +30 -19
- package/dist/cli.js +7123 -2921
- package/package.json +9 -4
- package/skills/apex-cli/SKILL.md +45 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Apex CLI Agent Contract
|
|
2
|
+
|
|
3
|
+
Use `apex` as the canonical command name. `drip` is a compatibility alias.
|
|
4
|
+
|
|
5
|
+
## Canonical Loop
|
|
6
|
+
|
|
7
|
+
1. `apex experiments pull <id-or-slug> --dir <folder>`
|
|
8
|
+
2. Edit only supported files in the pulled folder.
|
|
9
|
+
3. `apex experiments plan <folder> --json`
|
|
10
|
+
4. `apex experiments apply <folder> --json`
|
|
11
|
+
5. `apex experiments qa status <folder> --json`
|
|
12
|
+
6. Update QA with `apex experiments qa check`, `notes`, and `approve`.
|
|
13
|
+
7. Publish or launch only through the dashboard approval surface.
|
|
14
|
+
|
|
15
|
+
## Invariants
|
|
16
|
+
|
|
17
|
+
- Never hand-edit `qa.json` or `launch.json`.
|
|
18
|
+
- Launch is dashboard-only. The API and CLI do not start traffic.
|
|
19
|
+
- Prefer `--json`; piped stdout defaults to JSON automatically.
|
|
20
|
+
- JSON output is a stable contract: top level is `{ ok, version, command, data | error }`.
|
|
21
|
+
- Diagnostics, prompts, progress, and update notices go to stderr.
|
|
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.
|
|
24
|
+
|
|
25
|
+
## Exit Codes
|
|
26
|
+
|
|
27
|
+
- `0`: success
|
|
28
|
+
- `1`: general failure
|
|
29
|
+
- `2`: auth or permission failure
|
|
30
|
+
- `3`: validation failure
|
|
31
|
+
- `4`: confirmation required; inspect `error.details.retry`
|
|
32
|
+
- `5`: conflict, including stale filesystem state where detected
|
|
33
|
+
|
|
34
|
+
## Recovery
|
|
35
|
+
|
|
36
|
+
- Missing auth: run `apex login` interactively, or set `DRIP_API_KEY`.
|
|
37
|
+
- Headless login: pass `--api-key` or set `DRIP_API_KEY`; do not wait for prompts.
|
|
38
|
+
- 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.
|
|
39
|
+
- Apply invalidates QA: inspect `apex experiments plan`, then rerun apply with `--force` if intended.
|
|
40
|
+
- Stale workspace or filesystem: pull fresh files, reapply your edits, and plan again.
|
|
41
|
+
- Server limit errors: read the JSON error details; Apex includes server-owned limits when available.
|
|
42
|
+
|
|
43
|
+
## Filesystem Rules
|
|
44
|
+
|
|
45
|
+
- Treat `.apex/` as CLI-owned metadata.
|
|
46
|
+
- Edit experiment files, variation code, metrics, and targeting only through supported paths.
|
|
47
|
+
- Do not bypass the variation artifact persistence path with direct API writes.
|
|
48
|
+
- Keep generated evidence outside `qa.json`; attach it through QA commands.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Drip Trading GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Apex CLI
|
|
2
2
|
|
|
3
|
-
Command-line tools for Apex experiments
|
|
3
|
+
Command-line tools for Apex experiments, draft workspaces, GitOps pushes, QA
|
|
4
|
+
evidence, tracking checks, and agent handoffs.
|
|
4
5
|
|
|
5
6
|
## Install
|
|
6
7
|
|
|
@@ -8,35 +9,45 @@ Command-line tools for Apex experiments and Operator live preview sessions.
|
|
|
8
9
|
npm install -g @drip-apex/apex-cli
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
Create an Apex API key at:
|
|
14
|
-
|
|
15
|
-
```text
|
|
16
|
-
https://app.drip-apex.com/api-keys
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Then run:
|
|
12
|
+
## Authenticate
|
|
20
13
|
|
|
21
14
|
```bash
|
|
22
15
|
apex login
|
|
16
|
+
apex whoami
|
|
23
17
|
```
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
`apex login` opens the default browser OAuth flow at Apex `/cli/login`. For
|
|
20
|
+
headless environments, use an existing API key:
|
|
26
21
|
|
|
27
22
|
```bash
|
|
28
|
-
apex
|
|
23
|
+
apex login --api-key apx_your_key_here
|
|
24
|
+
DRIP_API_KEY=apx_your_key_here apex experiments list --json
|
|
29
25
|
```
|
|
30
26
|
|
|
31
|
-
##
|
|
27
|
+
## Common usage
|
|
32
28
|
|
|
33
29
|
```bash
|
|
34
|
-
apex
|
|
35
|
-
apex
|
|
30
|
+
apex experiments list
|
|
31
|
+
apex experiments pull <id-or-slug> --dir ./my-test
|
|
32
|
+
apex experiments plan ./my-test --json
|
|
33
|
+
apex experiments apply ./my-test --json
|
|
34
|
+
apex experiments qa status ./my-test --json
|
|
35
|
+
|
|
36
|
+
apex workspace checkout <experimentId> --variation <variationId> --dir ./workspace
|
|
37
|
+
apex workspace dev ./workspace --no-open
|
|
38
|
+
apex workspace publish ./workspace
|
|
39
|
+
|
|
40
|
+
apex push --dry-run
|
|
41
|
+
apex schema --json
|
|
36
42
|
```
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
Use `apex` as the canonical command name. `drip` is a compatibility alias.
|
|
39
45
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
## Full documentation
|
|
47
|
+
|
|
48
|
+
Read the CLI reference on the docs site:
|
|
49
|
+
|
|
50
|
+
- https://docs.drip-apex.com/cli/install-auth
|
|
51
|
+
- https://docs.drip-apex.com/cli/commands-output
|
|
52
|
+
|
|
53
|
+
Maintainers: see the [CLI release runbook](../../docs/cli-releases.md).
|