raiyanyahya / dallecli

💠 Provide users with the ability to generate, edit and filter images using the DALL-E 3 API provided by OpenAI, all from the command line.
https://dallecli.com
MIT License
61 stars 8 forks source link

read variable OPENAI_API_KEY #58

Closed carnager closed 11 months ago

carnager commented 11 months ago

Is your feature request related to a problem? Please describe. I am trying to automate setup of dallecli for termux and the only thing needing manual input is the setup of an API key, because the update command only allows interactive usage.

I see 2 solutions for this:

  1. allow to provide the api key directly from commandline dallecli update myapikey
  2. read OPENAI_API_KEY variable to update configuration automaticaly if not present.
raiyanyahya commented 11 months ago

Thats a great suggestion. This has been implemented in and released. Please update :) Use the --env flag and it will pick up the OPENAI_API_KEY from the environment variables.