Skip to content

Conversation

@kler
Copy link

@kler kler commented Nov 27, 2025

Implements a CLI flag to specify environment files, matching Honcho's behavior. This allows users to specify custom env files via command-line flag instead of only through the OVERMIND_ENV environment variable.

Changes:

  • Add EnvFiles field to start.Handler struct
  • Add -e/--env flag to start command (maps to OVERMIND_ENV env var)
  • Add loadEnvFiles() method to parse and load comma-separated env files
  • Load env files from flag before processing other options

The flag accepts comma-separated file paths and loads them after the default env files (~/.overmind.env, ./.overmind.env, ./.env), allowing flag-specified files to override default values.

Usage:
overmind start -e .env.local
overmind start -e .env.local,.env.development
overmind start --env .env.local,.env.development

Closes #206

Implements a CLI flag to specify environment files, matching Honcho's
behavior. This allows users to specify custom env files via command-line
flag instead of only through the OVERMIND_ENV environment variable.

Changes:
- Add EnvFiles field to start.Handler struct
- Add -e/--env flag to start command (maps to OVERMIND_ENV env var)
- Add loadEnvFiles() method to parse and load comma-separated env files
- Load env files from flag before processing other options

The flag accepts comma-separated file paths and loads them after the
default env files (~/.overmind.env, ./.overmind.env, ./.env), allowing
flag-specified files to override default values.

Usage:
  overmind start -e .env.local
  overmind start -e .env.local,.env.development
  overmind start --env .env.local,.env.development

Closes DarthSim#206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add -e/--env flag to specify environment files

1 participant