SynthForge SynthForge SynthForge IO

Docs · CLI

SynthForge IO CLI

The synthforge command (alias sf) drives the same SynthForge IO API from a terminal or a CI job.

Before you start: you need a personal API key. Create one in the app, then come back.

Install it from npm with npm install -g @synthforgeio/cli, or run it without installing using npx -p @synthforgeio/cli synthforge. It needs Node 20 or newer. You can always inject a Settings-minted key via SF_API_KEY without synthforge login.

bash
# Install once, globally
npm install -g @synthforgeio/cli

# Option A: use a key you created in Settings
export SF_API_KEY='sfk_live_…'
export SF_API_BASE='https://api.synthforge.io'   # optional; production is the default

# Option B: sign in and let the CLI store a key for you
export SF_PASSWORD='your-password'
synthforge login --email you@example.com

synthforge whoami
synthforge schemas list

# Generate a schema from a description, then generate the data and download it
SCHEMA_ID=$(synthforge schemas generate -d "customers and orders with FK" --name demo)
synthforge generate --schema "$SCHEMA_ID" \
  --rows customers=50,orders=200 \
  --format csv --seed 42 -o demo.zip

Next