Creates a new `screenci/` directory with a starter config, example video, and optional workflow file. The optional GitHub Actions workflow is written at `.github/workflows/screenci.yaml` in the current directory. `init` does not authenticate. If `SCREENCI_SECRET` is missing, `screenci record` will open a browser window and complete the login flow before recording starts.
The optional `[name]` is the ScreenCI project display name, not the directory name.
Because init writes ScreenCI files into `screenci/` and the optional workflow into `.github/workflows/screenci.yaml`, it works well inside existing projects without mixing generated files into your app source.
By default, `screenci test` skips ScreenCI's recording-only pacing so it stays fast:
- cursor moves become instant instead of animated
- built-in sleeps for click, hide, and zoom timing are skipped
- no screen recording is started
That makes `test` the right command while you are iterating on selectors, app state, and assertions.
### `--mock-record`
Use `--mock-record` when you want `screenci test` to keep the same animated timing model as `screenci record` without starting the actual browser screen capture:
```bash
npx screenci test --mock-record
npx screenci test --mock-record --grep "checkout"
```
This is mainly a troubleshooting option. Reach for it when:
-`screenci test` passes, but `screenci record` fails
- a timing issue only shows up with animated cursor moves or ScreenCI's built-in pauses
- you want to debug recording-like pacing without paying the full cost of local recording
You can also pass normal Playwright test arguments through `screenci test`. That means you can run only some tests while iterating by using the same filters you would use with `playwright test`, such as a file path or `--grep`:
Records videos with ScreenCI by running local Playwright with `SCREENCI_RECORDING=true`, then uploads results if `SCREENCI_SECRET` is set. If the secret is missing, `record` prompts for login before recording begins.
By default, if some recording tests fail, ScreenCI still uploads the successful recordings. To opt out, set `record.upload: 'all-or-nothing'` in `screenci.config.ts`.
-`--retries` is rejected because ScreenCI forces retries to `0`
`--workers`, `-j`, and `--fully-parallel` pass through to Playwright unchanged.
During `screenci record`, ScreenCI now waits for deferred recording finalization at the end of the run and shows a `Finalizing recordings...` spinner before reporting `Recordings finalized`.
- If `screenci test` works but `screenci record` fails, retry with `screenci test --mock-record` to reproduce recording-like timing without starting the real capture pipeline.