Skip to content

Commit adb61ad

Browse files
feat: Group experimentation commands under experimentation (#1575)
Move experiments, feature-flags, and segments under a single `auth0 experimentation` parent command, mirroring the Management API's experimentation grouping. Variations remain nested under feature-flags. Also improves the experiment allocation flow: interactive variation multi-select (choose 1 to 20) with paging; enforce the 20-allocation maximum and weight bounds on the non-interactive --allocations flag; diff-based updates that send only changed fields (allocations replaced wholesale when edited); interactive update opens editors for feature-flag parameters, variation overrides, and segment rules pre-filled with current values; render the full API response on update output. Regenerates docs and updates integration tests and helper scripts.
1 parent a242d42 commit adb61ad

73 files changed

Lines changed: 2239 additions & 1560 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/auth0_experimentation.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: default
3+
has_toc: false
4+
---
5+
# auth0 experimentation
6+
7+
Manage Auth0 Experiment Center resources: feature flags, segments, and experiments.
8+
9+
Feature flags define named parameters that experiments vary across user groups, segments group users by matching rules, and experiments run A/B tests by tying a feature flag, its variations, and traffic allocations together.
10+
11+
## Commands
12+
13+
- [auth0 experimentation experiments](auth0_experimentation_experiments.md) - Manage experimentation experiments
14+
- [auth0 experimentation feature-flags](auth0_experimentation_feature-flags.md) - Manage experimentation feature flags
15+
- [auth0 experimentation segments](auth0_experimentation_segments.md) - Manage experimentation segments
16+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
layout: default
3+
has_toc: false
4+
has_children: true
5+
---
6+
# auth0 experimentation experiments
7+
8+
Experiments run A/B tests by tying a feature flag, its variations, and traffic allocations together.
9+
10+
Typical workflow:
11+
1. Create a feature flag and its variations
12+
2. Optionally create segments for targeted allocation
13+
3. Create an experiment
14+
4. Validate it
15+
5. Start it
16+
17+
## Commands
18+
19+
- [auth0 experimentation experiments create](auth0_experimentation_experiments_create.md) - Create a new experiment
20+
- [auth0 experimentation experiments delete](auth0_experimentation_experiments_delete.md) - Delete an experiment
21+
- [auth0 experimentation experiments list](auth0_experimentation_experiments_list.md) - List your experiments
22+
- [auth0 experimentation experiments show](auth0_experimentation_experiments_show.md) - Show an experiment
23+
- [auth0 experimentation experiments status](auth0_experimentation_experiments_status.md) - Change an experiment's status
24+
- [auth0 experimentation experiments update](auth0_experimentation_experiments_update.md) - Update an experiment
25+
- [auth0 experimentation experiments validate](auth0_experimentation_experiments_validate.md) - Validate an experiment
26+
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
layout: default
3+
parent: auth0 experimentation experiments
4+
has_toc: false
5+
---
6+
# auth0 experimentation experiments create
7+
8+
Create a new experiment.
9+
10+
To create interactively, use `auth0 experimentation experiments create` with no flags.
11+
12+
To create non-interactively, supply all required flags.
13+
14+
## Usage
15+
```
16+
auth0 experimentation experiments create [flags]
17+
```
18+
19+
## Examples
20+
21+
```
22+
auth0 experimentation experiments create
23+
auth0 experimentation experiments create --name "button-color" --feature-flag-id ff_abc --authentication-flow login --allocation-strategy percentage --assignment-config '{"subject":"device"}' --allocations '[{"variation_id":"vid_1","weight":50,"is_control":true},{"variation_id":"vid_2","weight":50,"is_control":false}]'
24+
```
25+
26+
27+
## Flags
28+
29+
```
30+
-s, --allocation-strategy string Allocation strategy: percentage or segment.
31+
--allocations string JSON array of allocation items ({variation_id, weight, is_control} for percentage, where weight is an integer percentage from 1 to 100; {variation_id, segment_id, is_control} for segment).
32+
--assignment-config string JSON object configuring how users are assigned to variations (e.g. '{"subject":"device"}').
33+
-a, --authentication-flow string Authentication flow this experiment applies to (e.g. login, signup).
34+
-d, --description string Description of the experiment.
35+
-f, --feature-flag-id string ID of the feature flag to experiment on.
36+
--json Output in json format.
37+
--json-compact Output in compact json format.
38+
-n, --name string Name of the experiment.
39+
```
40+
41+
42+
## Inherited Flags
43+
44+
```
45+
--debug Enable debug mode.
46+
--no-color Disable colors.
47+
--no-input Disable interactivity.
48+
--tenant string Specific tenant to use.
49+
```
50+
51+
52+
## Related Commands
53+
54+
- [auth0 experimentation experiments create](auth0_experimentation_experiments_create.md) - Create a new experiment
55+
- [auth0 experimentation experiments delete](auth0_experimentation_experiments_delete.md) - Delete an experiment
56+
- [auth0 experimentation experiments list](auth0_experimentation_experiments_list.md) - List your experiments
57+
- [auth0 experimentation experiments show](auth0_experimentation_experiments_show.md) - Show an experiment
58+
- [auth0 experimentation experiments status](auth0_experimentation_experiments_status.md) - Change an experiment's status
59+
- [auth0 experimentation experiments update](auth0_experimentation_experiments_update.md) - Update an experiment
60+
- [auth0 experimentation experiments validate](auth0_experimentation_experiments_validate.md) - Validate an experiment
61+
62+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: default
3+
parent: auth0 experimentation experiments
4+
has_toc: false
5+
---
6+
# auth0 experimentation experiments delete
7+
8+
Delete an experiment.
9+
10+
Active experiments must be paused or completed before deleting.
11+
12+
To delete non-interactively, supply the experiment ID and use `--force` to skip confirmation.
13+
14+
## Usage
15+
```
16+
auth0 experimentation experiments delete [flags]
17+
```
18+
19+
## Examples
20+
21+
```
22+
auth0 experimentation experiments delete
23+
auth0 experimentation experiments delete <experiment-id>
24+
auth0 experimentation experiments delete <experiment-id> --force
25+
```
26+
27+
28+
## Flags
29+
30+
```
31+
--force Skip confirmation.
32+
```
33+
34+
35+
## Inherited Flags
36+
37+
```
38+
--debug Enable debug mode.
39+
--no-color Disable colors.
40+
--no-input Disable interactivity.
41+
--tenant string Specific tenant to use.
42+
```
43+
44+
45+
## Related Commands
46+
47+
- [auth0 experimentation experiments create](auth0_experimentation_experiments_create.md) - Create a new experiment
48+
- [auth0 experimentation experiments delete](auth0_experimentation_experiments_delete.md) - Delete an experiment
49+
- [auth0 experimentation experiments list](auth0_experimentation_experiments_list.md) - List your experiments
50+
- [auth0 experimentation experiments show](auth0_experimentation_experiments_show.md) - Show an experiment
51+
- [auth0 experimentation experiments status](auth0_experimentation_experiments_status.md) - Change an experiment's status
52+
- [auth0 experimentation experiments update](auth0_experimentation_experiments_update.md) - Update an experiment
53+
- [auth0 experimentation experiments validate](auth0_experimentation_experiments_validate.md) - Validate an experiment
54+
55+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: default
3+
parent: auth0 experimentation experiments
4+
has_toc: false
5+
---
6+
# auth0 experimentation experiments list
7+
8+
List all experiments. To create one, run: `auth0 experimentation experiments create`.
9+
10+
## Usage
11+
```
12+
auth0 experimentation experiments list [flags]
13+
```
14+
15+
## Examples
16+
17+
```
18+
auth0 experimentation experiments list
19+
auth0 experimentation experiments ls
20+
auth0 experimentation experiments list --json
21+
auth0 experimentation experiments list --status active
22+
auth0 experimentation experiments list --feature-flag-id <id>
23+
```
24+
25+
26+
## Flags
27+
28+
```
29+
--authentication-flow string Filter by authentication flow.
30+
--csv Output in csv format.
31+
--feature-flag-id string Filter by feature flag ID.
32+
--json Output in json format.
33+
--json-compact Output in compact json format.
34+
--status string Filter by status (draft, active, paused, completed, archived).
35+
```
36+
37+
38+
## Inherited Flags
39+
40+
```
41+
--debug Enable debug mode.
42+
--no-color Disable colors.
43+
--no-input Disable interactivity.
44+
--tenant string Specific tenant to use.
45+
```
46+
47+
48+
## Related Commands
49+
50+
- [auth0 experimentation experiments create](auth0_experimentation_experiments_create.md) - Create a new experiment
51+
- [auth0 experimentation experiments delete](auth0_experimentation_experiments_delete.md) - Delete an experiment
52+
- [auth0 experimentation experiments list](auth0_experimentation_experiments_list.md) - List your experiments
53+
- [auth0 experimentation experiments show](auth0_experimentation_experiments_show.md) - Show an experiment
54+
- [auth0 experimentation experiments status](auth0_experimentation_experiments_status.md) - Change an experiment's status
55+
- [auth0 experimentation experiments update](auth0_experimentation_experiments_update.md) - Update an experiment
56+
- [auth0 experimentation experiments validate](auth0_experimentation_experiments_validate.md) - Validate an experiment
57+
58+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
layout: default
3+
parent: auth0 experimentation experiments
4+
has_toc: false
5+
---
6+
# auth0 experimentation experiments show
7+
8+
Display details about an experiment including its allocations and validation status.
9+
10+
## Usage
11+
```
12+
auth0 experimentation experiments show [flags]
13+
```
14+
15+
## Examples
16+
17+
```
18+
auth0 experimentation experiments show
19+
auth0 experimentation experiments show <experiment-id>
20+
auth0 experimentation experiments show <experiment-id> --json
21+
```
22+
23+
24+
## Flags
25+
26+
```
27+
--json Output in json format.
28+
--json-compact Output in compact json format.
29+
```
30+
31+
32+
## Inherited Flags
33+
34+
```
35+
--debug Enable debug mode.
36+
--no-color Disable colors.
37+
--no-input Disable interactivity.
38+
--tenant string Specific tenant to use.
39+
```
40+
41+
42+
## Related Commands
43+
44+
- [auth0 experimentation experiments create](auth0_experimentation_experiments_create.md) - Create a new experiment
45+
- [auth0 experimentation experiments delete](auth0_experimentation_experiments_delete.md) - Delete an experiment
46+
- [auth0 experimentation experiments list](auth0_experimentation_experiments_list.md) - List your experiments
47+
- [auth0 experimentation experiments show](auth0_experimentation_experiments_show.md) - Show an experiment
48+
- [auth0 experimentation experiments status](auth0_experimentation_experiments_status.md) - Change an experiment's status
49+
- [auth0 experimentation experiments update](auth0_experimentation_experiments_update.md) - Update an experiment
50+
- [auth0 experimentation experiments validate](auth0_experimentation_experiments_validate.md) - Validate an experiment
51+
52+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
layout: default
3+
parent: auth0 experimentation experiments
4+
has_toc: false
5+
---
6+
# auth0 experimentation experiments status
7+
8+
Transition an experiment to a new lifecycle status: active, paused, completed, or archived.
9+
10+
• active — start (or resume) the experiment; runs full validation before activating
11+
• paused — pause a running experiment; it can be resumed by setting it active again
12+
• completed — mark the experiment as finished; it can then be archived
13+
• archived — archive a completed experiment
14+
15+
To set the status interactively, run `auth0 experimentation experiments status` with no arguments.
16+
17+
## Usage
18+
```
19+
auth0 experimentation experiments status [flags]
20+
```
21+
22+
## Examples
23+
24+
```
25+
auth0 experimentation experiments status
26+
auth0 experimentation experiments status <experiment-id>
27+
auth0 experimentation experiments status <experiment-id> active
28+
auth0 experimentation experiments status <experiment-id> paused
29+
```
30+
31+
32+
## Flags
33+
34+
```
35+
--json Output in json format.
36+
--json-compact Output in compact json format.
37+
```
38+
39+
40+
## Inherited Flags
41+
42+
```
43+
--debug Enable debug mode.
44+
--no-color Disable colors.
45+
--no-input Disable interactivity.
46+
--tenant string Specific tenant to use.
47+
```
48+
49+
50+
## Related Commands
51+
52+
- [auth0 experimentation experiments create](auth0_experimentation_experiments_create.md) - Create a new experiment
53+
- [auth0 experimentation experiments delete](auth0_experimentation_experiments_delete.md) - Delete an experiment
54+
- [auth0 experimentation experiments list](auth0_experimentation_experiments_list.md) - List your experiments
55+
- [auth0 experimentation experiments show](auth0_experimentation_experiments_show.md) - Show an experiment
56+
- [auth0 experimentation experiments status](auth0_experimentation_experiments_status.md) - Change an experiment's status
57+
- [auth0 experimentation experiments update](auth0_experimentation_experiments_update.md) - Update an experiment
58+
- [auth0 experimentation experiments validate](auth0_experimentation_experiments_validate.md) - Validate an experiment
59+
60+
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
layout: default
3+
parent: auth0 experimentation experiments
4+
has_toc: false
5+
---
6+
# auth0 experimentation experiments update
7+
8+
Update an experiment.
9+
10+
Note: feature flag, authentication flow, and allocation strategy cannot be changed after creation. To change an experiment's status, use `auth0 experimentation experiments status`.
11+
12+
To update interactively, use `auth0 experimentation experiments update` with no arguments.
13+
14+
## Usage
15+
```
16+
auth0 experimentation experiments update [flags]
17+
```
18+
19+
## Examples
20+
21+
```
22+
auth0 experimentation experiments update
23+
auth0 experimentation experiments update <experiment-id>
24+
auth0 experimentation experiments update <experiment-id> --name "new-name"
25+
auth0 experimentation experiments update <experiment-id> --assignment-config '{"subject":"device"}'
26+
auth0 experimentation experiments update <experiment-id> --allocations '[{"variation_id":"vid","weight":100,"is_control":true}]'
27+
```
28+
29+
30+
## Flags
31+
32+
```
33+
--allocations string JSON array of allocation items ({variation_id, weight, is_control} for percentage, where weight is an integer percentage from 1 to 100; {variation_id, segment_id, is_control} for segment).
34+
--assignment-config string JSON object configuring how users are assigned to variations (e.g. '{"subject":"device"}').
35+
-d, --description string Description of the experiment.
36+
--json Output in json format.
37+
--json-compact Output in compact json format.
38+
-n, --name string Name of the experiment.
39+
```
40+
41+
42+
## Inherited Flags
43+
44+
```
45+
--debug Enable debug mode.
46+
--no-color Disable colors.
47+
--no-input Disable interactivity.
48+
--tenant string Specific tenant to use.
49+
```
50+
51+
52+
## Related Commands
53+
54+
- [auth0 experimentation experiments create](auth0_experimentation_experiments_create.md) - Create a new experiment
55+
- [auth0 experimentation experiments delete](auth0_experimentation_experiments_delete.md) - Delete an experiment
56+
- [auth0 experimentation experiments list](auth0_experimentation_experiments_list.md) - List your experiments
57+
- [auth0 experimentation experiments show](auth0_experimentation_experiments_show.md) - Show an experiment
58+
- [auth0 experimentation experiments status](auth0_experimentation_experiments_status.md) - Change an experiment's status
59+
- [auth0 experimentation experiments update](auth0_experimentation_experiments_update.md) - Update an experiment
60+
- [auth0 experimentation experiments validate](auth0_experimentation_experiments_validate.md) - Validate an experiment
61+
62+

0 commit comments

Comments
 (0)