CLI
The screenci CLI keeps the workflow small: initialize a project, iterate
locally, record final output, and manage public delivery when needed. Most
commands resolve screenci.config.ts from the current directory unless you
pass --config <path>.
Command overview
| Command | Purpose |
|---|---|
screenci init [name] | Scaffold a ScreenCI project |
screenci test [playwrightArgs] | Run .video.ts files locally without final recording |
screenci record [playwrightArgs] | Record videos and upload results when configured |
screenci info | Print remote project info as JSON |
screenci make-public <videoId> | Enable public delivery for a video |
screenci make-private <videoId> | Disable public delivery for a video |
screenci init [name]
Create a new ScreenCI project in the current directory:
npm init screenci@latestnpm init screenci@latest my-productpnpm create screencipnpm create screenci my-productWhen using npm init, pass extra initializer flags after --:
npm init screenci@latest -- --yes --package-manager pnpmCommon options:
-y, --yesaccepts all defaults--agent <name>passes an agent name to the selected skills install command-v, --verboseprints underlying command output
Interactive defaults create the GitHub Actions workflow, install npm
dependencies, install Chromium, skip OS dependency installation, install the
ScreenCI skill, and install optional playwright-cli support.
Use this command in Installation & First Video.
screenci test [playwrightArgs...]
Show source
import { autoZoom, createNarration, hide, resetZoom, video, voices, zoomTo,} from 'screenci'
const narration = createNarration({ voice: { name: voices.Sophie }, en: { intro: 'This video introduces the CLI reference and the most common ScreenCI commands.', source: 'The page includes the ScreenCI source used to walk through the reference.', focus: 'One of the key command sections covers screenci test and the normal local iteration loop.', next: 'The same reference also covers the final screenci record flow.', },})
video('CLI reference walkthrough', async ({ page }) => { await hide(async () => { await page.goto('https://screenci.com/docs/reference/cli') await page.waitForLoadState('networkidle') })
await narration.intro() await narration.source.start() await autoZoom(async () => { await page.getByText('Show source').first().click() }) await narration.source.end()
await narration.focus() await zoomTo( page.getByRole('heading', { name: /screenci test \[playwrightArgs/ }) ) await page.waitForTimeout(700) await resetZoom()
await narration.next() await autoZoom(async () => { await page .getByRole('heading', { name: /screenci record \[playwrightArgs/ }) .scrollIntoViewIfNeeded() })
await zoomTo( page.getByRole('heading', { name: /screenci record \[playwrightArgs/ }) ) await page.waitForTimeout(700) await resetZoom()})Run videos locally without the final recording pipeline:
npx screenci testnpx screenci test videos/onboarding.video.tsnpx screenci test --grep "billing"npx screenci test --uipnpm exec screenci testpnpm exec screenci test videos/onboarding.video.tspnpm exec screenci test --grep "billing"pnpm exec screenci test --uiUse this during normal authoring. Most trailing arguments are forwarded to Playwright.
Common Playwright examples that also work here:
npx screenci test --project=chromiumnpx screenci test --grep "onboarding"npx screenci test --uipnpm exec screenci test --project=chromiumpnpm exec screenci test --grep "onboarding"pnpm exec screenci test --ui--mock-record
npx screenci test --mock-recordpnpm exec screenci test --mock-recordThis keeps recording-like pacing enabled without starting the real recording
capture path. Use it when test passes but record exposes timing
differences.
If you want that behavior by default for a project, set
test.mockRecord: true in screenci.config.ts.
screenci record [playwrightArgs...]
Record final output:
npx screenci recordnpx screenci record videos/onboarding.video.tsnpx screenci record --grep "billing"npx screenci record --project=chromiumpnpm exec screenci recordpnpm exec screenci record videos/onboarding.video.tspnpm exec screenci record --grep "billing"pnpm exec screenci record --project=chromiumrecord forwards normal Playwright file filters and --grep, so you can limit
recording to only some videos just like with screenci test.
Behavior:
- enables recording timing
- writes local output into
.screenci/ - uploads successful recordings when
SCREENCI_SECRETis available - prints a project URL after upload when rendering has been started remotely
Relevant options:
-c, --config <path>-v, --verbose
Important restriction:
--retriesis not supported because ScreenCI forces retries to0
screenci info
npx screenci infopnpm exec screenci infoPrints remote project data for the current projectName, including video IDs
and whether public delivery is enabled.
Use this before public-delivery changes when you need the remote videoId:
{ "projectName": "My Product", "videos": [ { "id": "video_123", "name": "Onboarding", "isPublic": true, "language": "en", "hasSubtitles": true } ]}screenci make-public <videoId>
npx screenci make-public video_123pnpm exec screenci make-public video_123Enables public delivery for a video. Get the ID from screenci info.
When you make a video public, ScreenCI starts it in the same mode as the app:
- public delivery is enabled for the video
- auto-select latest is enabled
- the latest finished render for each language becomes the active public output
That means make-public is the CLI equivalent of turning on Enable public
URL in the dashboard.
screenci make-private <videoId>
npx screenci make-private video_123pnpm exec screenci make-private video_123Disables public delivery for a video.
This is the CLI equivalent of turning off Enable public URL in the dashboard.
What the CLI does not do
The CLI currently covers:
- local iteration with
test - final capture and upload with
record - remote inspection with
info - public visibility changes with
make-publicandmake-private
Manual version pinning is currently handled in the app UI:
- turn off Auto-select latest version
- open a language section
- choose the version to mark as Selected
Shared environment and config behavior
These commands support --config <path>:
testrecordinfomake-publicmake-private
SCREENCI_SECRET is used for:
- uploads
- project info
- public delivery changes
If envFile is configured in screenci.config.ts, the CLI loads it
automatically.
Related pages
- Configuration for
screenci.config.ts.