Managing Environment Variables
Set, view, and sync environment variables between your local development environment and CreateOS.
List Variables
Bash1createos env list
Values are shown in full by default. Use --hide to mask them:
Bash1createos env list --hide
Set Variables
Bash1# Set a single variable2createos env set DATABASE_URL=postgres://localhost:5432/mydb34# Set multiple at once5createos env set API_KEY=sk-xxx SECRET=my-secret NODE_ENV=production
Remove a Variable
Bash1createos env rm API_KEY
Sync with Local Files
Pull remote variables to a local .env file
Bash1createos env pull
This creates a .env.<environment-name> file (e.g., .env.production). The CLI auto-adds .env.* to your .gitignore.
Push local variables to remote
Bash1createos env push
The CLI reads your .env.<environment-name> file, shows what will change, and asks for confirmation. Use --force to skip confirmation in CI.
Specify a custom file
Bash1createos env pull --file .env.local2createos env push --file .env.staging
CI/CD Usage
Bash1# Set from CI secrets2createos env set DATABASE_URL=$DB_URL --project <id> --environment <id>34# Pull for local debugging5createos env pull --project <id> --environment <id> --force