Skip to content

CLI prompts

These are the questions asked by npx @sogody/experiment-framework.

Usage

bash
npx @sogody/experiment-framework my-experiment

The project name is a required argument. The CLI exits if it is not provided.

Prompts

Number of variations

TypeSelect
Default1
Options1, 2, 3, 4, custom

Controls how many variation directories are generated under src/js/.

  • 1 - generates src/js/v1/ only (control)
  • 2 - generates src/js/v1/ and src/js/v2/ (A/B)
  • custom - prompts for a number between 1 and 10

The current CLI uses one generic button scaffold for every project. It does not ask for a boilerplate type.


Window namespace

TypeText
Defaultsgd
ValidationMust be a valid JavaScript identifier

Sets runtime.globalObject in experiment.config.js. The IIFE bundle registers under that namespace, for example window.sgd.

Keep the default sgd unless it conflicts with another experiment running on the same Adobe Target page.


Include emergency brake

TypeConfirm
Defaulttrue

Sets runtime.includeEmergencyBrake in experiment.config.js. When enabled, runScript() checks the Adobe Target emergency-brake configuration before running the experiment.


Enable E2E testing

TypeConfirm
Defaultfalse

When true, generates e2e/, playwright.config.js, and adds pnpm test:e2e to package.json. The CLI also runs pnpm playwright install after project setup.

If false, none of the E2E files are generated and Playwright is not installed.


Base URL (E2E only)

TypeText
Defaulthttps://samsung.com
ConditionOnly shown when E2E is enabled

The root URL for Playwright tests. Written to e2e/config.js as urlsConfig.baseUrl.


Market (E2E only)

TypeSelect
Default-
ConditionOnly shown when E2E is enabled

Selects which Samsung market(s) to run E2E tests against. Multi-country groups (BENELUX, NORDICS, IBERIA) generate one test per configured country. See the Markets Reference for all available options.


Run smoke test (E2E only)

TypeConfirm
Defaultfalse
ConditionOnly shown when E2E is enabled

When true, the CLI runs pnpm build followed by pnpm test:e2e after setup. This checks the generated project before you start editing it.

Internal tool - Samsung / Sogody experimentation team

Help improve the frameworkShare an idea or friction you encountered.Share framework feedback(opens in a new tab)