pgschema supports loading configuration from environment variables and dotenv .env files.
Overview
pgschema automatically loads configuration from:.envfile in the current directory (if present)- System environment variables
- Command-line flags (highest priority)
Supported Environment Variables
pgschema supports all standard PostgreSQL environment variables:string
default:"localhost"
Database server host
integer
default:"5432"
Database server port
string
required
Database name (required for all commands)
string
required
Database user name (required for all commands)
string
Database password
string
default:"prefer"
SSL mode for database connection. Valid values:
disable, allow, prefer, require, verify-ca, verify-fullstring
default:"pgschema"
Application name visible in
pg_stat_activity.env Setup
Create a.env file in your project directory:
.env to your .gitignore file to prevent committing sensitive credentials:

