BuilderIO / ai-shell

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

Add error message for missing argument #66

Closed AhmedElTabarani closed 1 year ago

AhmedElTabarani commented 1 year ago
λ npm exec ai
C:\Users\eltab\AppData\Local\npm-cache\_npx\afbc0d24890c4360\node_modules\ai\bin\ai.js:5
if (!args || args[0].split("/").length !== 2)

I think should send a nice message if the user doesn't send any argument

steve8708 commented 1 year ago

I'm not fully understanding this, can you elaborate? for instance if you just type ai you get the interative mode:

➜ ai                          

┌  AI Shell
│
◆  What would you like me to to do?
│  e.g. list js files
└
AhmedElTabarani commented 1 year ago

Sorry, this was my mistake, this error happens when I use npm exec ai without installing @builder.io/ai-shell globally first