CLI in CI
Use the LittleDemo CLI from scripts and CI jobs.
CLI in CI
CI should use an API key, not the browser device flow.
Basic setup
bashnpm install -g @littledemo/cliexport LITTLEDEMO_API_KEY=ld_live_xxxlittledemo whoami
Generate without waiting
bashlittledemo demos create \ --project "$LITTLEDEMO_PROJECT_ID" \ --prompt "Refresh the onboarding overview" \ --template guided-tour \ --no-wait
Prefer webhooks for deploy refreshes
If you only need to refresh existing demos after deploys, use the project webhook endpoint. It is simpler and does not require a live API key in that job.
bashcurl -X POST "https://littledemo.com/api/v1/webhooks/projects/$LITTLEDEMO_PROJECT_ID/refresh" \ -H "X-Webhook-Secret: $LITTLEDEMO_WEBHOOK_SECRET"