refactor screenci init flow

This commit is contained in:
Olli Paloviita
2026-05-04 11:11:08 +03:00
parent 82a7f33015
commit 549dca744e
4 changed files with 234 additions and 568 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ Most commands look for `screenci.config.ts` in the current directory. Use `--con
## `screenci init [name]`
Creates a new ScreenCI project directory with a starter config, example video, Dockerfile, and workflow files. Authentication happens automatically during `init`: a browser window opens so you can log in, and `SCREENCI_SECRET` is saved to `.env` in the new project. You do not need to authenticate separately before running `screenci record`.
Creates a new ScreenCI project directory with a starter config, example video, Dockerfile, and workflow files. `init` does not authenticate. If `SCREENCI_SECRET` is missing, `screenci record` will open a browser window and complete the login flow before recording starts.
```bash
npx screenci init
@@ -48,7 +48,7 @@ Use this when you want normal Playwright execution without recording.
## `screenci record [playwrightArgs...]`
Records videos with ScreenCI. On the host this normally builds and runs the project inside a container, then uploads results if `SCREENCI_SECRET` is set. Authentication is handled by `screenci init` `record` does not prompt for credentials.
Records videos with ScreenCI. On the host this normally builds and runs the project inside a container, then uploads results if `SCREENCI_SECRET` is set. If the secret is missing, `record` prompts for login before the recording begins.
```bash
npx screenci record