CLI Reference
gendb
GenDB — synthetic database for development & testing.
Creates a synthetic schema with LLM-analyzed synthetic data inside your real PostgreSQL database. Developers can work against realistic data without production PII.
gendb init
Initialize GenDB by introspecting the real database.
Connects to the real database, introspects the schema, and creates gendb.yaml.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--url |
string | (required) | PostgreSQL connection string |
Example
gendb up
Create synthetic schema, apply tables, and generate synthetic data.
Creates a gendb_synthetic schema inside your real database, clones the table structure from the public schema, and generates synthetic data using the configured LLM.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--rows |
int | 0 (use config) |
Override default row count |
--seed |
int64 | 0 (use config) |
Override random seed |
Example
# Use defaults from gendb.yaml
gendb up
# Generate 500 rows per table with a specific seed
gendb up --rows 500 --seed 12345
gendb down
No-op — the synthetic schema persists inside your database automatically.
The synthetic schema lives in the same database as your real data and doesn't need to be "stopped". To remove it, use gendb destroy.
gendb destroy
Drop the synthetic schema and all its data.
Drops the gendb_synthetic schema and all tables within it using CASCADE.
gendb generate
Generate synthetic data (without truncating existing data).
Appends new synthetic rows to the synthetic schema tables. Requires the synthetic schema to exist (gendb up).
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--rows |
int | 0 (use config) |
Override default row count |
--seed |
int64 | 0 (use config) |
Override random seed |
Example
gendb reset
Truncate and regenerate all synthetic data.
Truncates all tables in the synthetic schema, then regenerates fresh data. Requires the synthetic schema to exist.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--rows |
int | 0 (use config) |
Override default row count |
--seed |
int64 | 0 (use config) |
Override random seed |
Example
# Regenerate with defaults
gendb reset
# Regenerate with a specific seed for reproducibility
gendb reset --seed 42
gendb sync
Re-introspect real DB and apply schema changes to synthetic.
Drops the synthetic schema, re-creates it, fetches the latest schema from the real database, and applies the reconstructed DDL. Data is not regenerated — run gendb reset after syncing.
gendb status
Show connection status and synthetic schema state.
Displays the real database URL, synthetic schema name, LLM provider/model, and whether the synthetic schema exists.
Example output
Real DB: postgres://user:pass@localhost:5432/mydb
Synthetic schema: gendb_synthetic
LLM: ollama/llama3.2
Synthetic DB: active (schema gendb_synthetic exists)
gendb proxy
Start the PostgreSQL wire protocol proxy.
Listens for PostgreSQL connections and routes them to the real database. GENDB SQL commands are intercepted and executed by the proxy.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--port |
int | 5433 |
Proxy listen port |