BuilderIO / ai-shell

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

Add option for silent mode #19

Closed AlaEddineBoughanmmi closed 1 year ago

AlaEddineBoughanmmi commented 1 year ago

would be nice to offer the option for a silent mode so we don't output the explanation

 
 $ ai --silent  list all log files
 | find . -name "*.log"
 | [run, revise, cancel]
 
soumilroy commented 1 year ago

seconded! Would it be a good approach to set it in config?

ai-shell config set SILENT_MODE=true|false

soumilroy commented 1 year ago

Made a PR on this

https://user-images.githubusercontent.com/42084105/230769049-e85950b2-b45c-44ea-8ff2-b1b1a7d88aa8.mov

steve8708 commented 1 year ago

Great! I love the idea of a config. I'm not seeing your PR though, did you submit it here? https://github.com/BuilderIO/ai-shell/pulls

AlaEddineBoughanmmi commented 1 year ago

I think using a flag -s or --silent (similar/opposite to --verbose on linux) is more flexible so w dont have to change the config regularly and type a long command like this very often ai-shell config set SILENT_MODE=true|false

or we can have both options!

AlaEddineBoughanmmi commented 1 year ago

I can submit a PR if you haven't added this feature yet @soumilroy?

steve8708 commented 1 year ago

Great, yeah I love the idea of supporting both

soumilroy commented 1 year ago

@steve8708 submitted. Sorry I forgot to push last night.

@AlaEddineBoughanmmi Agreed on having both options :)

steve8708 commented 1 year ago

Merged, and released in 0.1.6!