End-to-end Workflow
A complete walkthrough from installing Weavori to exporting synthetic data.
Scenario
You have a production PostgreSQL database and need a synthetic copy for staging or development.
Step 1: Install Weavori
If you haven't already, install Weavori for your platform.
weavori version
weavori 1.0.0
Step 2: Authenticate (licensed features)
If you are using Weavori's licensed features, authenticate first:
weavori login
This opens your browser to authenticate via Supabase Auth. See the login reference for details.
Step 3: Save your database connection
Save your PostgreSQL DSN so subsequent commands use it automatically:
weavori connect "postgres://user:pass@localhost:5432/production"
✓ Connection successful! DSN saved to config.
Step 4: Estimate the schema
Run estimate to introspect your database and verify connectivity. This is a safe, read-only operation.
weavori estimate "postgres://user:pass@localhost:5432/production"
Connecting to database...
Introspecting schema...
Connected.
Found 2 schema(s).
"public": 12 table(s)
"audit": 3 table(s)
...
Step 5: Plan without target
Run generate without --target to see the generation plan without writing any data:
weavori generate "postgres://user:pass@localhost:5432/production"
Generation order (parents before children):
1. public.departments
2. public.users
3. public.projects
4. public.tasks
5. public.comments
6. audit.log_entries
...
✓ Schema introspection and FK resolution complete.
Specify --target <dsn> to generate and export synthetic data.
Step 6: Generate synthetic data
Create a target database and run the full generation:
createdb staging_clone
weavori generate "postgres://user:pass@localhost:5432/production" \
--target "postgres://user:pass@localhost:5432/staging_clone" \
--rows 5000
For non-interactive use (CI/CD), add --yes to skip the preview prompt:
weavori generate "postgres://user:pass@localhost:5432/production" \
--target "postgres://user:pass@localhost:5432/staging_clone" \
--rows 5000 --yes
Weavori introspects, resolves dependencies, samples distributions, generates synthetic data, and exports it — all in one command.
Step 7: Verify the results
psql "postgres://user:pass@localhost:5432/staging_clone"
staging_clone=# SELECT COUNT(*) FROM users;
count
-------
5000
staging_clone=# SELECT u.name, t.title
staging_clone-# FROM tasks t JOIN users u ON t.assignee_id = u.id
staging_clone-# LIMIT 5;
name | title
---------------+---------------------
Jane Doe | Implement auth
John Smith | Write tests
...
Foreign key relationships are intact — every assignee_id references a valid users.id.
Next steps
- Read about large-scale generation
- Browse the generate command reference