feat: Group experimentation commands under experimentation#1575
Merged
Conversation
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.
ramya18101
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Groups the experimentation commands under a single
experimentationparent command, mirroring the Management API's experimentation grouping.Command grouping
auth0 experimentation(aliasexp) as the parent forexperiments,feature-flags, andsegments. Variations remain nested underfeature-flags(auth0 experimentation feature-flags variations ...), matching the API where variations belong to a feature flag.auth0 experiments,auth0 feature-flags,auth0 segments) in favour of the grouped paths.Allocation flow (experiments)
create/updatenow presents a variation multi-select (choose 1 to 20) with paging for feature flags that have many variations.--allocationsflag, so the flag and interactive picker validate identically.Update behaviour
updatereads the current resource first, pre-fills interactive prompts with the existing values, and sends only the fields that actually changed. Allocations are PUT-like and replaced wholesale when edited.updateopens editors pre-filled with current values for feature-flag parameters, variation overrides, and segment rules, matching thecreateexperience. It also offers to edit the experiment's assignment config and allocations behind a confirmation, including the percentage/segment strategy selection.📚 References
Follow-up to #1562.
🔬 Testing
experiments,feature-flags, andsegmentsupdate commands to mock the newGetcall and assert diff behaviour, full-response rendering, and allocation validation (empty, over-limit, out-of-range weight).experimentationcommand paths, plus new cases covering allocation validation on bothcreateandupdate.make docs.📝 Checklist