dave1010 / clipea

📎🟢 Like Clippy but for the CLI. A blazing fast AI helper for your command line
MIT License
299 stars 12 forks source link

Python implementation #16

Closed edouard-sn closed 7 months ago

edouard-sn commented 8 months ago

Didn't have a lot to do this week-end, so decided to quickly port clipea in Python. I tried to stay close to how @dave1010 thought the app while adapting it to Python. I used the llm library and you will see some local import for llm, it has been done in order to not have 0.2+ sec on import when the user is, for instance, only asking for help and the router imports all commands.

I dropped the brew support, taking into account that now it is pip-compliant.

Didn't upload to PyPi but can do it if needed.

Ressources (config) are straight in the ./clipea package folder, imo it could be done better but is fine for now.

Feel free to discuss the implementation below.

Closes #3

dave1010 commented 8 months ago

This looks excellent! Thanks for you work. I'll give it a proper review and run through some tests ASAP.

dave1010 commented 7 months ago

Hi @edouard-sn. Are you able to explain the use of f";\ {os.linesep}" here? I'm not sure if the \ is intentional. Thanks.

https://github.com/dave1010/clipea/pull/16/commits/80caa04f91d464562a67ef7ddd71a8a7dbebc762#diff-a2cbd9f31a7210a200606eb185a572e28807c04a7682611e8416698e02081336R60

dave1010 commented 7 months ago

@all-contributors please add @edouard-sn for code, ideas, maintenance, platform. Please add @antwxne for review.

allcontributors[bot] commented 7 months ago

@dave1010

I've put up a pull request to add @edouard-sn! :tada:

I've put up a pull request to add @antwxne! :tada: