@momentic/wizard
v0.4.1
Published
Onboarding wizard for setting up Momentic end-to-end testing in your project.
Maintainers
Readme
@momentic/wizard
The official onboarding wizard for Momentic. It walks you through picking your testing platforms (web / iOS / Android), installing the matching Momentic CLI(s), configuring an API key, and scaffolding your first end-to-end test, all in a single command.
Learn more in the official documentation.
Get Started
Run the wizard inside your project directory:
npx @momentic/wizard@latestThe wizard will:
- Detect your package manager (npm, pnpm, yarn, bun).
- Ask which platforms you want to test: web, iOS, Android (multi-select).
- Prompt you to sign in with your Momentic account in the browser, or skip.
- Install the matching CLI(s):
momenticfor web,momentic-mobilefor iOS / Android. - Create a
momentic.config.yamlfile. - For iOS / Android, print a checklist of local prerequisites (Xcode/idb for
iOS; Java,
ANDROID_HOME, adb for Android) and link to the relevant quickstart. - Print the next commands to run, tailored per platform.
Subcommands
momentic-wizard login: sign in via your browser and save an API key to~/.momentic/auth.json.momentic-wizard logout: remove the saved credentials.
Options
Flags are documented by the CLI itself (defaults, env vars, and choices included), so run:
npx @momentic/wizard@latest --helpThe flags that matter most for CI and coding agents — -y / --yes,
--api-key, --platform, and --editor-tools — are covered in
Non-interactive mode below.
Non-interactive mode (CI & coding agents)
The wizard normally prompts for the platform, sign-in, project name, and which
coding agents to wire up. When there is no TTY (CI, or a coding agent like
Claude Code / Cursor shelling out), or when you pass -y / --yes, it runs
non-interactively and never prompts:
- Auth comes from
--api-key/MOMENTIC_API_KEY(validated against the server), falling back to~/.momentic/auth.json. If neither is present it exits with a clear message instead of opening a browser or hanging. - Platform uses
--platform(defaults toweb). - Project name uses the directory /
package.jsonname. - Coding agents default to the ones detected in your environment plus
Momentic skills; override with
--editor-tools(all,none, or a list such asclaude-code,cursor,skills).
MOMENTIC_API_KEY=mk_... npx @momentic/wizard@latest --yes