Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expanding command line interface or linking to sister project #190

Open
mandric opened this issue Jul 13, 2022 · 0 comments
Open

expanding command line interface or linking to sister project #190

mandric opened this issue Jul 13, 2022 · 0 comments

Comments

@mandric
Copy link

mandric commented Jul 13, 2022

I think expanding the cli here or linking to a project written in go that uses this library to provide a little more cli utility would be very helpful and more complete.

I find the cli interface bit limited, for example I don't fine this functionality generally useful:

godotenv -f /path/to/something/.env,/another/path/.env fortune

something like a generic set/get of key/values like seems more useful:

godotenv set foo "$bar"  # updates ./.env by default

similar to the python cli dotenv:

$ dotenv 
Usage: dotenv [OPTIONS] COMMAND [ARGS]...

  This script is used to set, get or unset values from a .env file.

Options:
  -f, --file PATH                 Location of the .env file, defaults to .env
                                  file in current working directory.

  -q, --quote [always|never|auto]
                                  Whether to quote or not the variable values.
                                  Default mode is always. This does not affect
                                  parsing.

  -e, --export BOOLEAN            Whether to write the dot file as an
                                  executable bash script.

  --version                       Show the version and exit.
  --help                          Show this message and exit.

Commands:
  get    Retrieve the value for the given key.
  list   Display all the stored key/value.
  run    Run command with environment variables present.
  set    Store the given key/value.
  unset  Removes the given key.
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

No branches or pull requests

1 participant