Litescope Action

June 10, 2026 · View on GitHub

GitHub Action for Litescope — schema diff, migration validation, backup integrity check, and drift detection for SQLite, Turso, and Cloudflare D1.

Commands

CommandDescriptionTier
diffSchema diff between two sourcesFree
validateVerify a migration matches a specFree
checkBackup integrity checkFree
monitor-checkOne-shot schema drift detectionFree

Usage

Schema diff on every PR

- uses: croc100/litescope-action@v1
  with:
    command: diff
    source: before.db
    target: after.db
    format: markdown
    comment-on-pr: "true"

Validate migration in CI

- uses: croc100/litescope-action@v1
  with:
    command: validate
    source: before.db
    target: after.db
    expect: .litescope/migration.yaml

Exits 1 if the migration doesn't match the spec. Use litescope validate init to generate the spec file.

Backup integrity check

- uses: croc100/litescope-action@v1
  with:
    command: check
    source: backup.db
    target: production.db

Schema drift detection

- uses: croc100/litescope-action@v1
  with:
    command: monitor-check
    source: turso://TOKEN@ORG/prod
    baseline: .litescope/baseline.json

Exits 1 if drift is detected. Combine with on: schedule for automated drift monitoring.

Inputs

InputDescriptionDefault
commandCommand to run (diff, validate, check, monitor-check)diff
sourcePrimary database (path, turso://, or d1:// DSN)
targetSecondary database for diff/validate/check
expectSpec file path for validate
baselineSnapshot file path for monitor-check
formatOutput format: terminal, json, markdownterminal
comment-on-prPost result as a PR commentfalse
versionLitescope version to uselatest
licensePro/Cloud license key

Outputs

OutputDescription
has-diffWhether schema differences were found (diff only)
has-driftWhether drift was detected (monitor-check only)
resultFull command output

Pro features

Set license input with your key for Pro/Cloud features:

- uses: croc100/litescope-action@v1
  with:
    command: monitor-check
    source: turso://TOKEN@ORG/prod
    baseline: .litescope/baseline.json
    license: ${{ secrets.LITESCOPE_LICENSE }}

Get a license at litescope.dev/pricing.

License

Elastic License 2.0