Litescope Docs
SQLite production operations — diff, validate, migrate, monitor, and fleet management from one binary.
Installation
macOS (Homebrew)
brew install croc100/tap/litescope
Linux
Download the latest binary from Releases, extract, and move to your PATH:
curl -fsSL https://github.com/croc100/litescope-dist/releases/latest/download/litescope_Linux_x86_64.tar.gz | tar xz
sudo mv litescope /usr/local/bin/
Windows
Download litescope_*_windows_amd64.zip from Releases, extract the .exe, and add its directory to PATH.
Verify
litescope --version
Activate Pro license
After purchasing, you'll receive a license key by email (lsc_pro_…). Activate it in one of two ways:
Option A — environment variable
export LITESCOPE_LICENSE=lsc_pro_your_key_here
Add this to your shell profile (~/.zshrc, ~/.bashrc) to persist it.
Option B — license file
mkdir -p ~/.litescope
echo "lsc_pro_your_key_here" > ~/.litescope/license
Verify activation
litescope license
diff free
Compare schema and data between two SQLite databases.
litescope diff <old.db> <new.db> [flags]
| Flag | Default | Description |
|---|---|---|
| --format | text | Output format: text, json, markdown, html |
| --data | false | Include row-level data diff in addition to schema |
| --output, -o | stdout | Write output to file |
Examples
# Human-readable schema diff
litescope diff prod-before.db prod-after.db
# JSON output for CI
litescope diff old.db new.db --format json
# Include data diff
litescope diff old.db new.db --data
# Save HTML report
litescope diff old.db new.db --format html -o report.html
check free
Validate a backup database against a reference. Runs PRAGMA integrity check, compares schema, and optionally verifies row counts.
litescope check <backup.db> <reference.db> [flags]
| Flag | Default | Description |
|---|---|---|
| --data | false | Also compare row counts per table |
| --format | text | Output format: text, json |
Examples
# Basic integrity + schema check
litescope check backup.db prod.db
# Include row count comparison
litescope check backup.db prod.db --data
# Use in CI (exits 1 on failure)
litescope check backup.db prod.db && echo "backup OK"
migrate free
Generate a migration SQL from a diff, then apply it safely with an automatic backup and rollback on failure.
generate
litescope migrate generate <old.db> <new.db> [flags]
| Flag | Default | Description |
|---|---|---|
| --output, -o | stdout | Write SQL to file |
apply
litescope migrate apply <db> <migration.sql> [flags]
| Flag | Default | Description |
|---|---|---|
| --dry-run | false | Preview what would run without writing to disk |
| --backup-dir | same dir as db | Where to store the automatic pre-migration backup |
Examples
# Generate SQL
litescope migrate generate old.db new.db -o migration.sql
# Preview before applying
litescope migrate apply prod.db migration.sql --dry-run
# Apply (creates backup automatically)
litescope migrate apply prod.db migration.sql
apply always creates a timestamped backup before writing. If any statement fails, the entire migration is rolled back.
monitor pro
Baseline a known-good schema, then check for drift. The watch subcommand runs continuously and can alert on changes.
snapshot
litescope monitor snapshot <db> [flags]
| Flag | Default | Description |
|---|---|---|
| --output, -o | baseline.json | Path to write the baseline snapshot |
check
litescope monitor check <db> [flags]
| Flag | Default | Description |
|---|---|---|
| --baseline, -b | baseline.json | Path to the baseline snapshot |
| --format | text | Output format: text, json |
watch
litescope monitor watch <db> [flags]
| Flag | Default | Description |
|---|---|---|
| --baseline, -b | baseline.json | Path to the baseline snapshot |
| --interval | 30s | Poll interval (e.g. 10s, 1m, 5m) |
| --webhook | — | Slack or Discord webhook URL for drift alerts |
Examples
# Baseline
litescope monitor snapshot prod.db -o baseline.json
# One-off check
litescope monitor check prod.db -b baseline.json
# Continuous watch with Slack alert
litescope monitor watch prod.db -b baseline.json \
--interval 1m \
--webhook $SLACK_WEBHOOK_URL
fleet pro
Discover and operate an entire Turso org or Cloudflare D1 account in parallel — baseline, drift-check, and migrate every database at once.
check
litescope fleet check [flags]
| Flag | Default | Description |
|---|---|---|
| --provider | — | turso or d1 |
| --org | — | Turso org slug or Cloudflare account ID |
| --token | — | Platform API token (Turso management token or CF API token) |
| --db-token | — | Turso database token (for connecting to each DB) |
| --concurrency | 8 | Max parallel workers |
| --format | text | Output format: text, json |
snapshot
litescope fleet snapshot [flags]
Same flags as check. Takes a baseline snapshot of every database in the fleet.
Examples
# Baseline entire Turso org
litescope fleet snapshot \
--provider turso \
--org my-org \
--token $TURSO_TOKEN \
--db-token $TURSO_DB_TOKEN
# Drift check all at once
litescope fleet check \
--provider turso \
--org my-org \
--token $TURSO_TOKEN \
--db-token $TURSO_DB_TOKEN
# Cloudflare D1
litescope fleet check \
--provider d1 \
--org $CF_ACCOUNT_ID \
--token $CF_API_TOKEN
~/.litescope/fleet/baselines/ keyed by database name.
Desktop GUI
The GUI app bundles all CLI operations in a visual interface. It ships as part of the same binary download — run litescope gui to launch, or double-click the .app on macOS.
Named connections
Add databases by clicking + Add in the sidebar. Free tier supports up to 3 named connections; Pro is unlimited.
Tools
- Diff — visual schema and data diff between two databases
- Explorer — browse tables and query rows
- Check — validate a backup against a reference
- Migrate — generate and apply migrations with dry-run preview
- Monitor (Pro) — snapshot, check drift, run continuous watch
- Fleet (Pro) — discover and check Turso / D1 databases
Activating Pro in the GUI
Open Settings → License and paste your lsc_pro_… key, or set the LITESCOPE_LICENSE environment variable before launching.
Changelog
v0.2.0 2026-06-16
- GUI: Monitor Watch — continuous drift detection with live event feed
- GUI: Fleet panel — Turso and D1 discover, snapshot, parallel check
- GUI: Free/Pro tier — 3-connection limit, Pro gate on Monitor and Fleet
- Lemon Squeezy payment integration — $89/year Pro subscription
- Online license verification via Cloudflare Worker
- Binary releases via litescope-dist + Homebrew tap
v0.1.0 2026-05-01
- Initial release: diff, check, migrate, monitor, fleet CLI
- GUI desktop app (Wails/Go + React)
- Named connections sidebar