not-poma / lazyshell

GPT powered Zsh completion script
MIT License
371 stars 26 forks source link

Created Homebrew formula & release hash workflow #3

Open LaurentFough opened 1 year ago

LaurentFough commented 1 year ago

Hey;

Very interesting project. Been using/testing it for a a couple of days; and started picking off items on the roadmap.

I've created a working Homebrew formula (+makefile), plus a Github Actions release file, to generate shasums, for releases.

You can test it first, then I can create a proper PR.

not-poma commented 1 year ago

Thanks for the contribution, I never worked with homebrew before

  1. Shouldn't the homebrew file reference the dependencies (curl, jq)?
  2. I feel like it should try to add the lines to .zshrc automatically (and remove them upon uninstall), and only list caveat about OpenAI key. Some users might even have the API key in their environment as the number of different AI tools grows rapidly. Although in this case we probably should suppress the API key warning on startup.
  3. What this regex does?
  4. Even the smallest improvements are welcome!
LaurentFough commented 1 year ago

Thanks for the contribution, I never worked with homebrew before

  1. Shouldn't the homebrew file reference the dependencies (curl, jq)?
  2. I feel like it should try to add the lines to .zshrc automatically (and remove them upon uninstall), and only list caveat about OpenAI key. Some users might even have the API key in their environment as the number of different AI tools grows rapidly. Although in this case we probably should suppress the API key warning on startup.
  3. What this regex does?
  4. Even the smallest improvements are welcome!

@not-poma Great feedback, thanks for taking a look.

LaurentFough commented 1 year ago

I also have a clean method of using wget for the API call; then failing over to curl if needed.

xPMo commented 1 year ago
  • we definitely don't want to be in a situation where we make changes to a users shell init, those changes get edited and during uninstall we can't uninstall correctly as we don't know what to look for.

imho: Asking, then adding as [[ -r $pathto/lazyshell.zsh ]] && ... is reasonable.

not-poma commented 1 year ago

I also have a clean method of using wget for the API call; then failing over to curl if needed.

Forgot to mention that I've implemented this fallback after you mentioned it.

imho: Asking, then adding as [[ -r $pathto/lazyshell.zsh ]] && ... is reasonable.

brew installs are usually non-interactive, not sure where would be a good place to ask this.