BuilderIO / ai-shell

A CLI that converts natural language to shell commands.
MIT License
4.04k stars 257 forks source link

RFC: Complete refactor for ai-shell #33

Closed aabmets closed 1 year ago

aabmets commented 1 year ago

I would like to completely refactor this library and contribute the changes to this repo, but it would take some time to complete and the code would be incompatible with any new changes that are implemented to the original repo in the mean time. Therefore, would it be reasonable to contribute the refactored source code to this repo at all, or should I just fork it into a completely separate project?

The reason behind the refactor is that I would like to change how some things work and implement some additional features that would be too complicated to implement considering the current structure of the source code.

steve8708 commented 1 year ago

What changes are you interested in implementing? I tend to much prefer incremental change over large sweeping (large refactor) changes

aabmets commented 1 year ago

What changes are you interested in implementing? I tend to much prefer incremental change over large sweeping (large refactor) changes

I would like to encrypt the api key with a password when its saved into the config ini file. I have already written the code to do it and it works. The integrity is also checked with a hash function and it is possible to switch off the safe mode. The code for this exists, but it is incompatible with your master branch, because i completely reworked how config logic works, because, to be blunt, your code could be structured a lot better with more forethought. Sorry for being blunt.

steve8708 commented 1 year ago

hi @aabmets - we prefer a more constructive and collaborative approach on this project, and prefer not to talk down to others work

I do very much think encryption would be a great add, and if you are open to making the minimal changes to add this, it would be a great contribution.

If you would like to open a PR purely reworking the config system, and writing unit tests to ensure the behavior is identical, I would certainly be open to reviewing it.

Just please to keep the scope as small as reasonably possible, to avoid excessive merge conflicts or surprise new behaviors, given the config system to date has worked well for our purposes and I would prefer to not "fix what isn't broken" when possible, given the risk if introducing potential new problems if the scope of changes is larger than the problem requires

As you may be able to tell, ai-shell is evolving quickly through community contribution and iteration, and I'd like to keep the code as conducive to this as possible so anyone can contribute and improve the project. This also means building an inclusive environment where we value all contributions

I am more than happy to accept pull requests, but please do keep them incremental

aabmets commented 1 year ago

Okay, thanks for the feedback. I'm going to fork a new project from this one and built it myself.