malv env
Configure environment variables for your apps. Each app can have different values for development and production.
Usage
# Interactive mode - choose an app to configure
malv env
# Configure a specific app
malv env @my-org/my-app
# Configure for production
malv env --production
# Show status of all variables
malv env --status
How It Works
Apps declare required environment variables in environment.json:
{
"GOOGLE_CLIENT_ID": {
"description": "OAuth client ID for Google login"
},
"GOOGLE_CLIENT_SECRET": {
"description": "OAuth client secret"
},
"OPENAI_API_KEY": {
"description": "API key for OpenAI"
}
}
The malv env command reads this file and prompts you for values.
Development vs Production
Environment variables are stored separately:
| Environment | File Location |
|---|---|
| Development | .malv/dev/.env.{app-name} |
| Production | .malv/production/.env.{app-name} |
Use --production to configure production values:
malv env @my-org/auth --production
Interactive Mode
Running malv env without arguments shows all apps and their configuration status:
? Select an app to configure:
@my-org/auth (2 of 3 configured)
❯ @my-org/email (0 of 2 configured)
@my-org/notes (fully configured)
Select an app to fill in missing values.
Status Check
See what's configured and what's missing:
malv env --status
Output:
@my-org/auth
✓ GOOGLE_CLIENT_ID
✓ GOOGLE_CLIENT_SECRET
✗ OPENAI_API_KEY (missing)
@my-org/email
✗ SMTP_HOST (missing)
✗ SMTP_PASSWORD (missing)
Editing Values
To change an existing value, run malv env for that app again. It will show current values and let you update them.
Security Notes
The .malv/ directory is gitignored by default. Never commit environment files with secrets.
For production deployments, configure environment variables in your hosting platform (Cloudflare Workers secrets, etc.) rather than using local files.