BuilderIO / ai-shell

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

command not found: ai #48

Open joeysantana3 opened 1 year ago

joeysantana3 commented 1 year ago

I tried following the readme to install this tool. But after installation, I get command not found. I restarted iTerm after installation. Any tips? Thanks!

macOS Monterey 12.6.3 (Intel chip) iTerm2 Build 3.4.19


zsh --version                                                                                                     
zsh 5.8.1 (x86_64-apple-darwin21.0)

node --version                                                                                                      
v19.8.1

npm --version                                                                                                       
8.1.0

ls /usr/local/Cellar/node/19.8.1/lib/node_modules/@builder.io/ai-shell                                              
LICENSE  README.md  dist  node_modules  package.json

brew --version                                                                                                    
Homebrew 4.0.13
Homebrew/homebrew-core (git revision 39002442006; last commit 2023-03-11)

npm install -g @builder.io/ai-shell    

changed 40 packages, and audited 42 packages in 2s

13 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

ai         
zsh: command not found: ai

ai-shell                                                                                               
zsh: command not found: ai-shell
joeysantana3 commented 1 year ago

Adding this to my ./zshrc made it work for me.

alias ai='/usr/local/Cellar/node/19.8.1/lib/node_modules/@builder.io/ai-shell/dist/cli.mjs'

MatsuriMW commented 1 year ago

works for me too, thx!

raphdcst commented 1 year ago

Same problem but on windows, do you have solutions ?

fredx commented 3 months ago

You likely don't have your node's bin folder on the path. Check to see if /usr/local/Cellar/node/19.8.1/bin is on the path. If not add it.

If it is on the path, confirm the ai command is in the bin folder and symlinked to the node module's script.

ai@ -> ../lib/node_modules/@builder.io/ai-shell/dist/cli.mjs