Standalone daily-sync runner. Reuses the same scraping recipe/adapter code as
apps/extension, driven by Playwright instead of a browser extension —
see docs/design/DESIGN_BRIEF-scheduled-sync.md for the full design.
For PowerShell setup, persistent-login guidance, and Windows Task Scheduler, see the Windows guide.
npx playwright install chromium # one-time, needs full (non-headless-shell) chromium
npm -w apps/scraper-cli run login # opens a browser window — log into AliExpress manuallySave an API token (same token the extension's "Connect" flow generates):
mkdir -p apps/scraper-cli/.data
echo '<token>' > apps/scraper-cli/.data/tokenOr set ALI_SUM_TOKEN in the environment instead of a file.
npm -w apps/scraper-cli run sync # incremental sync (headless)
npm -w apps/scraper-cli run sync:headed # incremental sync with visible browser
npm -w apps/scraper-cli run sync:full # ignore watermark, full re-scan
ALI_SUM_HEADED=1 npm -w apps/scraper-cli run sync # watch it runALI_SUM_API_BASE— defaults tohttp://localhost:3000ALI_SUM_TOKEN— API bearer token (overrides.data/token)ALI_SUM_HEADED— set to1to run headed instead of headlessALI_SUM_ALIEXPRESS_USERNAME/ALI_SUM_ALIEXPRESS_PASSWORD— optional auto-login fallback for headless-only environments; more fragile than the one-time manualloginflow since AliExpress can still challenge a password login with CAPTCHA/device verification.
Point your OS scheduler (macOS launchd, Windows Task Scheduler) at
npm -w apps/scraper-cli run sync on whatever daily cadence you want.
Set ALI_SUM_API_BASE explicitly when the scheduler targets a remote
deployment. It defaults to http://localhost:3000.