allwright

Quickstart

One command to a passing test.

npm init allwright@latest scaffolds a working TypeScript or JavaScript project — config, a starter test for the surfaces you pick, dependencies installed — instead of assembling one by hand.

$ npm init allwright@latest my-app

✔ TypeScript or JavaScript?

✔ Web, Mobile Android, Mobile iOS — select any?

✔ scaffolded, dependencies installed

$ cd my-app

$ npm test

✔ 1 passed

It asks two questions — language, and which surfaces to test — then writes a real, runnable project against the same public demo targets used throughout our guides, detects your package manager from an existing lockfile (or falls back to whichever manager invoked it), and installs for you. The generated Web test runs immediately; mobile tests run once the selected emulator, simulator, or device is available.

What lands in the folder

.
|-- tests/
|   |-- web.spec.ts
|   |-- mobile.spec.ts
|   `-- ios.spec.ts
|-- allwright.config.yaml
|-- vitest.config.ts
|-- tsconfig.json
|-- package.json
`-- README.md

web.spec.ts, mobile.spec.ts, and ios.spec.ts are included based on which surfaces you pick; tsconfig.json only for TypeScript projects.

Scripting it, or wiring it into CI

Every prompt has a matching flag, so CI and scripts can skip the interactive session entirely.

FlagDoes
--yes / -yAccept defaults (TypeScript, Web) without prompting
--typescript / --javascriptSkip the language prompt
--web / --mobile / --iosPick a surface without the interactive prompt
--surface <web|mobile-android|mobile-ios>Repeat to scaffold any surface combination
--bothPreserve the Web + Mobile Android shortcut
--allScaffold Web, Mobile Android, and Mobile iOS together
--package-manager <bun|npm|pnpm|yarn>Override auto-detection
--no-installScaffold without installing dependencies

Example: npm init allwright@latest my-app -- --typescript --ios --no-install. See the create-allwright README for the full reference.

Prefer to build it up yourself?

The initializer is for the blank-folder case. If you're wiring allwright into an existing TypeScript or JavaScript project, our getting-started guide walks through the same project by hand — install @allwright.dev/vitest, write a config, write a test, run it — so you understand what each generated file is actually doing.

Testing Android? Jump to the Android testing walkthrough once you have a project scaffolded. For iOS, select Mobile iOS in the initializer; it writes the public Flights IPA configuration and a retrying iosApp test. Working in another language, allwright's client libraries are published and ready to install directly:

Not sure what to click? Start the inspector

With the allwright CLI installed, add the plugin for your surface, then start the inspector. It opens at http://127.0.0.1:9227; click an element in the screenshot and copy its locator in your language. Web pages aren't covered yet.

Android

Needs adb and an emulator or connected device.

allwright plugin install mobile-android
allwright inspector mobile-android ./sample.apk

Pass a local APK or a download URL. --device picks an emulator or serial.

iOS

Needs a Mac with Xcode and a Simulator or registered iPhone.

allwright plugin install mobile-ios
allwright inspector mobile-ios ./Flights-simulator.ipa

Pass a .app, .zip, .ipa, or URL. --device picks a Simulator name or UDID.

macOS

Needs macOS 14+, Xcode, and Accessibility permission.

allwright plugin install desktop-mac
allwright inspector desktop-mac com.apple.TextEdit

Pass the app's bundle identifier. --url opens a URL in the app.

Windows

Needs Windows x64. Nothing else to install.

allwright plugin install desktop-windows
allwright inspector desktop-windows "C:\Windows\System32\notepad.exe"

Pass an executable path or a command like notepad.exe.

Add --no-open to print the address instead of opening a browser. Use Interact mode to navigate to the screen you want, then switch back to Inspect to pick an element. Full walkthrough →

Try it now

Run the command, see what lands in a real folder, then check Availability for exactly what today's command set covers.