Skip to content

Getting Started

Prerequisites

  • Go 1.21+ (for building from source)
  • PostgreSQL — a real database to introspect
  • Ollama (recommended for local LLM) — or an OpenAI API key

Walkthrough

1. Start the proxy

Point GenDB at your real database and start the proxy:

gendb serve --db-database mydb --port 5433

2. Connect through the proxy

psql -h localhost -p 5433 -U user mydb

3. Generate data and toggle routing

From any connection through the proxy, send GENDB SQL commands:

-- Generate synthetic data for a table
CALL gendb.generate_data(include => 'users', rows => 500);

-- Route queries for "users" to the generated data
CALL gendb.return_generated(include => 'users');

-- Switch back to real data
CALL gendb.return_actual(include => 'users');

Next Steps