COMPARISON

SupaForge vs. Supabase CLI db diff

Two live environments, the whole project - not just the schema.

The SupaForge CLI is open source and on npm: npm install -g @akal/supaforge. A hosted dashboard is on the way - to hear when it opens.

What supabase db diff Does

supabase db diff compares a database with the schema your migration files produce, and writes the DDL that turns one into the other. It's the natural tool for a local-first workflow: change the local database, diff, commit the migration.

Its scope is the Postgres schema. Many teams also change things in the dashboard - auth settings, storage buckets, cron jobs - and that's where it stops.

What SupaForge Adds

SupaForge compares two live environments - staging and production, a branch and production, or any pair - across the whole project:

  • Postgres schema - powered by DBDiff
  • Reference data - the rows of the tables you choose
  • RLS - policies, and tables with RLS switched off
  • Roles and grants - including anon, authenticated and service_role
  • Auth configuration, storage and Edge Functions
  • Cron jobs, webhooks, Realtime, Vault and extensions
  • Queues and pg_partman partition sets
  • Migration history - local files against what the target has applied
Featuresupabase db diffSupaForge
Schema✅ DDL✅ DDL, via DBDiff
Reference data-✅ Row by row
Roles & grants-✅
Auth settings-✅
Storage buckets-✅ Settings and policies
Cron, webhooks, Realtime, Vault-✅
Edge Functions-✅ Deployed versions
ComparesA database with your migrationsAny two environments, or a directory of schema files with one
ApplyingCommit and push the migrationdiff --apply, in one transaction, with --prove
SummaryThe generated SQLDrift score, severities, CI annotations

Example

Install
npm install -g @akal/supaforge
supaforge.config.json
{
  "environments": {
    "staging": {
      "dbUrl": "$STAGING_DATABASE_URL",
      "projectRef": "STAGING_REF",
      "accessToken": "$SUPABASE_ACCESS_TOKEN"
    },
    "production": {
      "dbUrl": "$PRODUCTION_DATABASE_URL",
      "projectRef": "PROD_REF",
      "accessToken": "$SUPABASE_ACCESS_TOKEN"
    }
  },
  "source": "staging",
  "target": "production"
}
Everything
supaforge diff
Auth settings only
supaforge diff --check=auth
Storage only
supaforge diff --check=storage

When to Use supabase db diff

If every change goes through migration files and nobody touches the dashboard, supabase db diff is a fine way to write those migrations. SupaForge complements it by checking that the environments really match - including everything that isn't schema.

Summary

supabase db diff writes schema migrations. SupaForge compares any two live environments across the whole project and fixes the target safely - the better fit for teams that use the dashboard alongside code.

Ready to try SupaForge?

Install the CLI and run your first diff in a minute. Nothing is changed until you add --apply.

npm install -g @akal/supaforge
View on GitHub →