stackbuilders / dotenv-hs

Load environment variables from dotenv files for Haskell
https://hackage.haskell.org/package/dotenv
MIT License
65 stars 14 forks source link

Introduce a .dotenv.config file to store and read flags for Dotenv CLI #160

Closed FranzGB closed 1 month ago

FranzGB commented 1 year ago

The current implementation of the Dotenv Command Line Interface (CLI) requires users to provide multiple flags in order to execute a program with specific environment variables. This can result in a lengthy and unwieldy command.

To address this issue, it is proposed that a .dotenv.config file be introduced. This file will contain the necessary flags to be passed to the CLI and will be read by Dotenv, allowing users to execute programs with the required environment variables in a more concise and streamlined manner.

This approach is inspired by the behavior of RSpec, a popular testing framework for Ruby. By introducing a .dotenv.config file, users will be able to more easily manage the necessary flags for their programs and streamline their workflow.

Example:

# .dotenv.config
-x .env.example
-x .env.example.db
-f .env.db 
CristhianMotoche commented 1 year ago

Hey @FranzGB I've assigned @flandrade to solve this issue. Could you please follow up with her on the development of this feature?

aloussase commented 1 month ago

Hi, what is the difference between the -x and -f flags?

CristhianMotoche commented 1 month ago

Hello @aloussase The difference is:

I hope that is clear. I think we'll need to revisit our README.md to make this clearer.