Appearance
Create Stripchat Extension
You are helping a user scaffold a new Stripchat extension project. Collect the required configuration by asking the user the questions below, then run the CLI command with their answers.
Strict Rules
- Mark options as "recommended", "default", or "suggested" if it's reccommended by the instruction. NEVER mark a category or optional slots as recommended, default or suggested.
- For question 1 (Project Name): present a single free-text input field. Do NOT show predefined choices.
- For questions 2, 3, 4, 5: present ONLY the predefined options listed below. Do NOT allow free-text input ("type your own answer" or similar). The user must pick from the listed options only.
- If the user provides an invalid value for any question, tell them the value is invalid, show the valid options again, and re-ask the same question. Repeat until a valid option is selected. Do NOT skip ahead.
Questions to Ask
Ask these questions in order, one at a time. Wait for a valid answer before proceeding to the next question.
1. Project Name
Ask: "What should the project be called?"
Present a single free-text input field.
Constraints:
- Required, cannot be empty
- Must match (case-insensitive):
^[a-z0-9@][a-z0-9._-]*[a-z0-9]?$/i - Use lowercase letters, numbers, hyphens, dots, and underscores; may start with
@
If the name is invalid, explain the constraints and ask again.
2. Extension Category
Ask: "What type of extension is this?"
Options (show only these, no free-text):
| Value | Label |
|---|---|
games-and-fun | Games & Fun |
sex-toys | Sex Toys |
chat-bots | Chat Bots |
Say: Reply with 1, 2, 3 or option value.
Answer 1 should lead to games-and-fun, answer 2 should lead to sex-toys, and answer 3 should lead to chat-bots. User could also replay with value. User could replay with label. If the user selects an invalid option, show the valid options again and re-ask the question.
3. Optional Slots
The available optional slots depend on the chosen category. Required slots are included automatically and should not be listed as choices.
If category is games-and-fun:
- Required (auto-included):
EXTENSION_SLOT_MAIN_GAME_FUN,EXTENSION_SLOT_BACKGROUND - Exactly one of these must be selected:
EXTENSION_SLOT_RIGHT_OVERLAYorEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY
If category is sex-toys:
- Required (auto-included):
EXTENSION_SLOT_MAIN_SEX_TOY,EXTENSION_SLOT_BACKGROUND - Optional to select:
EXTENSION_SLOT_MOVEABLE_OVERLAY,EXTENSION_SLOT_RIGHT_OVERLAY,EXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY - The user may select at most one of
EXTENSION_SLOT_RIGHT_OVERLAYandEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY - The user may select none optional slots.
If category is chat-bots:
- Required (auto-included):
EXTENSION_SLOT_BACKGROUND - Optional to select:
EXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY - User can select either none or
EXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY
Ask the slot question based on the chosen category:
- For
games-and-fun, ask the user to choose exactly one ofEXTENSION_SLOT_RIGHT_OVERLAYorEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY. - For
sex-toys, presentEXTENSION_SLOT_MOVEABLE_OVERLAY,EXTENSION_SLOT_RIGHT_OVERLAY, andEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAYtogether as checkable options. The user may select none, one, or multiple, but must not select bothEXTENSION_SLOT_RIGHT_OVERLAYandEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY. - For
chat-bots, presentEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAYas a checkable option. The user may select none orEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY.
4. UI Framework
If the category is chat-bots and EXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY is not selected, skip this question and use vanilla automatically.
Ask: "Which UI framework do you want to use? (Recommended: Preact)"
Options (show only these, no free-text):
| Value | Label |
|---|---|
preact | Preact (Recommended) |
vanilla | Vanilla |
Say: Reply with 1, 2 or option value.
Answer 1 should lead to preact, answer 2 should lead to vanilla. User could also replay with value. Replaying with various spelling (e.g. Preact, vanilla) should lead to the correct value. If the user selects an invalid option, show the valid options again and re-ask the question.
5. Language
Ask: "Which language do you want to use? (Recommended: TypeScript)"
Options (show only these, no free-text):
| Value | Label |
|---|---|
ts | TypeScript (Recommended) |
js | JavaScript |
Say: Reply with 1, 2 or option value.
Answer 1 should lead to ts, answer 2 should lead to js. User could also reply with value. Replaying with various spelling (e.g. type script, typescript, Typescript) should lead to the correct value. If the user selects an invalid option, show the valid options again and re-ask the question.
Running the Command
After collecting all answers, run:
bash
npm create @stripchatdev/stripchat-extension@latest -- \
--name <name> \
--category <category> \
--slots <comma-separated-slots> \
--framework <framework> \
--language <language>- The
--slotsflag accepts a comma-separated list of the optional slots the user selected (no spaces around commas). - If the user selected no optional slots, pass an empty string:
--slots "" - For
games-and-fun,--slotsmust contain exactly one ofEXTENSION_SLOT_RIGHT_OVERLAYorEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY - For
sex-toys,--slotsmay be empty, may includeEXTENSION_SLOT_MOVEABLE_OVERLAY, and may include at most one ofEXTENSION_SLOT_RIGHT_OVERLAYorEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY - For
chat-bots,--slotsmay be empty or may containEXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY - All flag values must exactly match the "Value" column from the tables above.
Example
bash
npm create @stripchatdev/stripchat-extension@latest -- \
--name my-cool-game \
--category games-and-fun \
--slots EXTENSION_SLOT_VIDEO_DECORATIVE_OVERLAY \
--framework preact \
--language tsAfter the command completes, inform the user of the next steps printed by the CLI:
cd <name>
npm install
npm run dev