Skip to content

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

@kler

Description

@kler

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

Problem

Currently, Overmind only supports loading environment files from specific hardcoded locations:

  • ~/.overmind.env
  • ./.overmind.env
  • ./.env (unless OVERMIND_SKIP_ENV is set)
  • Files specified via OVERMIND_ENV environment variable

While the OVERMIND_ENV environment variable allows specifying custom env files, there's no CLI flag equivalent. This makes it inconsistent with similar tools like Honcho, which provides a -e/--env flag for this purpose.

Proposed Solution

Add a -e/--env flag to the start command that allows specifying environment file(s) to load, similar to Honcho's implementation:

# Single file
overmind start -e .env.local

# Multiple files (comma-separated)
overmind start -e .env.local,.env.development

# Long form
overmind start --env .env.local,.env.development

The flag should:

  • Accept comma-separated file paths (like Honcho)
  • Load files after the default env files (allowing override)
  • Maintain backward compatibility with OVERMIND_ENV environment variable
  • Support the same environment variable name (OVERMIND_ENV) for consistency

Use Cases

  • Different environment files for different environments (development, staging, production)
  • Project-specific env files without modifying global or default .env files
  • Easier integration with CI/CD pipelines where env files might be in non-standard locations
  • Consistency with other Procfile-based tools like Honcho

Example

# Current way (works but requires environment variable)
OVERMIND_ENV=.env.local,.env.development overmind start

# Proposed way (more intuitive and consistent)
overmind start -e .env.local,.env.development

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions