Installation Guide¶
Complete installation and setup instructions for Lanterne Rouge.
System Requirements¶
- Python: 3.8 or higher
- Operating System: macOS, Linux, or Windows
- Memory: 2GB RAM minimum
- Storage: 500MB free space
- Internet: Required for API access and updates
API Prerequisites¶
Before installing Lanterne Rouge, you'll need API access to:
Required APIs¶
- Oura Ring: Personal Access Token
- Strava: Application credentials (Client ID, Secret, Refresh Token)
- OpenAI: API key for GPT models
Optional APIs¶
- Twilio: For SMS notifications (alternative to email)
- GitHub: Personal Access Token for automated workflows
Installation Steps¶
1. Clone the Repository¶
2. Set Up Python Environment¶
3. Install Dependencies¶
For documentation development:
4. Configuration¶
-
Copy environment template:
-
Edit
.env
with your credentials:# Required APIs OURA_TOKEN=your_oura_personal_access_token STRAVA_CLIENT_ID=your_strava_client_id STRAVA_CLIENT_SECRET=your_strava_client_secret STRAVA_REFRESH_TOKEN=your_strava_refresh_token OPENAI_API_KEY=your_openai_api_key # Optional: Model configuration OPENAI_MODEL=gpt-4-turbo-preview USE_LLM_REASONING=true # Notifications EMAIL_ADDRESS=your_email@example.com EMAIL_PASS=your_app_password TO_EMAIL=recipient@example.com TO_PHONE=1234567890@txt.att.net # Optional: Twilio SMS USE_TWILIO=false TWILIO_ACCOUNT_SID=your_twilio_sid TWILIO_AUTH_TOKEN=your_twilio_token TWILIO_FROM_PHONE=your_twilio_number # GitHub integration GH_PAT=your_github_personal_access_token
5. Initialize Database¶
python -c "from lanterne_rouge.mission_config import bootstrap; bootstrap('missions/tdf_sim_2025.toml')"
This creates the SQLite database (memory/lanterne.db
) with your mission configuration.
6. Verify Installation¶
Run a test to ensure everything is working:
API Setup Guides¶
Oura Ring API¶
- Visit Oura Developer Portal
- Log in with your Oura account
- Generate a Personal Access Token
- Copy the token to your
.env
file
Strava API¶
- Go to Strava API Settings
- Create a new application
- Note your Client ID and Client Secret
- Follow the OAuth flow to get a Refresh Token
- Add all credentials to your
.env
file
OpenAI API¶
- Visit OpenAI API Keys
- Create a new API key
- Add to your
.env
file - Ensure you have sufficient credits/usage limits
Troubleshooting¶
Common Issues¶
Permission Denied on macOS/Linux:
Python Module Not Found:
Database Initialization Fails:
- Check that missions/tdf_sim_2025.toml
exists
- Verify Python path in import statement
- Ensure database directory is writable
API Connection Issues: - Verify all API tokens are valid and active - Check internet connectivity - Review API rate limits and quotas
Getting Help¶
- Check our troubleshooting guide
- Review GitHub Issues
- Join discussions in GitHub Discussions
Next Steps¶
Once installation is complete:
- First Run: Execute
python scripts/daily_run.py
- Fiction Mode: Set up with
python scripts/configure_rider_profile.py example
- Automation: Configure GitHub Actions for daily runs
- Customization: Explore configuration options