# CLI: Import from Supabase, Firebase, Convex or Postgres
Source: https://sovaria.in/docs/cli-import

Move a Supabase, Firebase, Convex, Neon or other Postgres project to Sovaria with sov import: schema and rules, users with their passwords, data, documents, files, and a report.

Run with `--dry-run` first: everything is read and checked, nothing is written. Every run writes `sovaria-import-report.json`. Step by step: [Migrate from Supabase or Firebase](https://sovaria.in/docs/migrate-from-supabase-or-firebase), [Migrate from Convex](https://sovaria.in/docs/migrate-from-convex), [Migrate from Neon or PostgreSQL](https://sovaria.in/docs/migrate-from-postgres).

Supabase:
```bash
sov import supabase \
  --db-url 'postgresql://postgres:PASSWORD@db.REF.supabase.co:5432/postgres' \
  --supabase-url https://REF.supabase.co --service-key "$SUPABASE_SERVICE_ROLE_KEY" --dry-run
```

Firebase:
```bash
firebase auth:export users.json --format=json
sov import firebase --service-account sa.json \
  --auth-export users.json --hash-config hash.json --rules firestore.rules --dry-run
```

Convex:
```bash
npx convex export --path snapshot.zip --include-file-storage --prod
sov import convex --snapshot snapshot.zip --dry-run
```

Neon / Postgres:
```bash
sov import postgres --db-url "$DATABASE_URL" \
  --users-query "select id, email, password_hash, name from users" --dry-run
```

## sov import

Import a Supabase, Firebase, Convex or Postgres (Neon, RDS…) project

### sov import supabase
`sov import supabase [OPTIONS]`
Import a Supabase project: schema + RLS, users with passwords, data, storage.

### sov import firebase
`sov import firebase [OPTIONS]`
Import a Firebase project: Auth users with passwords, Firestore, Storage, and a rules report.

### sov import convex
`sov import convex [OPTIONS]`
Import a Convex deployment: Convex Auth users with passwords, every table, file storage.

### sov import postgres
`sov import postgres [OPTIONS]`
Import a Postgres database (Neon, RDS, Railway, self-hosted): schema, data, and your app's users.
