UnitAutogen connects using the standard PostgreSQL environment variables. Set them once, then run any command:
set PGHOST=127.0.0.1
set PGPORT=5432
set PGUSER=postgres
set PGPASSWORD=********
set PGDATABASE=mydb
You can also supply a full connection string in UNITAUTOGEN_DSN instead of the separate variables, which is handy when switching between databases:
set UNITAUTOGEN_DSN=postgresql://postgres:********@127.0.0.1:5432/mydb
The examples above use the Windows Command Prompt (set VAR=value). The same variables on other shells:
set UNITAUTOGEN_DSN=postgresql://user:pass@host:5432/mydb$env:UNITAUTOGEN_DSN="postgresql://user:pass@host:5432/mydb"export UNITAUTOGEN_DSN=postgresql://user:pass@host:5432/mydbUse whichever matches the terminal you run unitautogen from. The variable names and values are identical across all three.