Speak Multi Env Setup
Overview
Configure Speak across development, staging, and production environments for language learning applications.
Prerequisites
- Separate Speak accounts or API keys per environment
- Secret management solution (Vault, AWS Secrets Manager, etc.)
- CI/CD pipeline with environment variables
- Environment detection in application
Instructions
- Environment Strategy
- Configuration Structure
- Environment Detection
- Secret Management by Environment
- Environment Isolation
- Feature Flags by Environment
- Environment-Specific Audio Storage
- Environment Health Checks
For full implementation details, load: Read(${CLAUDE_SKILL_DIR}/references/implementation-guide.md)
Output
- Multi-environment config structure
- Environment detection logic
- Secure secret management
- Production safeguards enabled
- Feature flags by environment
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Wrong environment | Missing SPEAK_ENV | Set environment variable |
| Secret not found | Wrong secret path | Verify secret manager config |
| Config merge fails | Invalid JSON | Validate config files |
| Production guard triggered | Wrong environment | Check SPEAK_ENV value |
| Feature unavailable | Wrong environment | Verify feature flags |
Examples
Quick Environment Check
const config = getSpeakConfig();
console.log(`Environment: ${config.environment}`);
console.log(`API Base: ${config.baseUrl}`);
console.log(`Mock Mode: ${config.mockMode ? 'ON' : 'OFF'}`);
console.log(`Features:`, config.features);
Resources
Next Steps
For observability setup, see speak-observability.