Docs/Reference

CI: a clip for every release

The GitHub Action#

npx demovie ci init     # writes .github/workflows/demovie.yml (asks first; --yes to skip)

The generated workflow runs on release: published and workflow_dispatch (and, if you uncomment it, deployment_status for Vercel previews). It uses the composite action in packages/action:

yaml
- uses: actions/checkout@v7
  with:
    fetch-depth: 0                       # tags and history for `demovie changes`
- uses: enszrlu/demovie/packages/action@v0
  with:
    agent: claude                        # or codex
    type: changelog
    app-url: ${{ github.event.deployment_status.environment_url }}   # or `start: pnpm build && pnpm start`
  env:
    ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}              # an API key, not a subscription
    DEMOVIE_USER: ${{ secrets.DEMOVIE_USER }}
    DEMOVIE_PASSWORD: ${{ secrets.DEMOVIE_PASSWORD }}

Inputs: agent, agent-version (pin it), type, formats, since (default: the previous tag), app-url or start, working-directory, comment (default true), upload-release-asset (default true on releases), node-version (default 22).

What it does:

  1. Sets up Node, finds the lockfile nearest to working-directory (up to the repository root, so a monorepo app installs at the workspace root), sets up pnpm (with its store cached) or Bun when that's what the lockfile says, and installs your dependencies (pnpm install --frozen-lockfile, npm ci, yarn install, bun install). pnpm's version comes from packageManager in package.json, else from the lockfile's format.
  2. Installs the agent CLI at the pinned version.
  3. Installs the Chromium build that your demovie's Playwright version expects (read from demovie --json doctor; with its system libraries on Linux), and ffmpeg if missing.
  4. demovie doctor, then demovie capture --changed --since <ref>.
  5. demovie changes --since <ref> for the story, then demovie make --agent … --type changelog --yes.
  6. Uploads out/ as a workflow artifact. The videos and out-dir outputs are relative to the repository root.
  7. Comments on the pull request (or writes the job summary) with the poster, links and the QA summary.
  8. On releases, attaches the MP4s and posters to the release (gh release upload).

Vercel previews#

Set app-url from github.event.deployment_status.environment_url and add the VERCEL_AUTOMATION_BYPASS_SECRET secret: the action sends it as x-vercel-protection-bypass with x-vercel-set-bypass-cookie: true on every request to the preview.

Overrides for any CI#

The CLI reads these environment variables, so other CI systems can do the same as the action:

VariableEffect
DEMOVIE_APP_URLUse an already running app at this URL (no start command).
DEMOVIE_APP_STARTReplace app.start.command.
DEMOVIE_APP_HEADERSJSON object of extra request headers (treated as secrets).
CIImplies --yes (no prompts).

demovie changes#

npx demovie changes --since v1.2.0 --json

Lists commits (conventional-commit type, scope, subject, PR numbers; PR titles via gh when available), changed files, and the routes they affect — directly (a page or layout changed) or through the import graph (a shared component used by a page, tsconfig paths resolved, up to 6 imports deep) — plus the captures and flows to refresh and a one-line story of the user-visible changes.

↑ ↓ to move↵ to openesc to close