diff --git a/apps/web/content/docs/cli/meta.json b/apps/web/content/docs/cli/meta.json index bd78e7b..f45f7ec 100644 --- a/apps/web/content/docs/cli/meta.json +++ b/apps/web/content/docs/cli/meta.json @@ -1,5 +1,5 @@ { "title": "CLI", "defaultOpen": true, - "pages": ["index", "programmatic-api", "options", "compatibility"] + "pages": ["index", "programmatic-api", "options", "prompts", "compatibility"] } diff --git a/apps/web/content/docs/cli/prompts.mdx b/apps/web/content/docs/cli/prompts.mdx new file mode 100644 index 0000000..4e5fe32 --- /dev/null +++ b/apps/web/content/docs/cli/prompts.mdx @@ -0,0 +1,59 @@ +--- +title: Using the interactive prompts +description: How to navigate and answer the CLI's interactive questions +--- + +## Overview + +The CLI uses `@clack/prompts` for interactive questions. These prompts work well in most terminals and are fully keyboard-driven. + +## Core keys + +- **Navigate**: Up/Down arrow keys +- **Confirm/continue**: Enter +- **Cancel**: Ctrl+C + +## Prompt types you’ll see + +### Single select (choose one) + +- **Move** with Up/Down, **Enter** to choose the highlighted option. + +Typical places: choosing a web or native framework, picking a runtime or API. + +### Multi-select (choose many) + +- **Move** with Up/Down. +- **Space** toggles the highlighted option on/off. +- **Enter** confirms your selection(s). +- Some prompts allow selecting none (you can press Enter without toggling anything). + +Typical places: selecting project types (web/native), choosing example apps. + +### Grouped multi-select (addons) + +- Options are organized under group headings. +- **Move** with Up/Down, **Space** to toggle an option, **Enter** to confirm. +- Group headings are informational; toggle the items within groups. + +Used when selecting addons like Biome, PWA, Turborepo, etc. + +### Confirm (yes/no) + +- Use Left/Right or Up/Down to highlight Yes/No, then **Enter**. + +Typical places: installing dependencies, initializing Git. + +### Text input + +- Type your answer and press **Enter**. +- If validation fails, a short message will explain what to fix; edit and press **Enter** again. + +Typical places: project name/path, database URLs, provider-specific inputs. + +## Tips + +- You can skip all prompts with `--yes` if you want the defaults. See the [Options](/docs/cli/options#yes--y) page. +- If you accidentally start the wrong flow, press **Ctrl+C** to cancel safely. + +