Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run cli command from package without global install using npx

I'm trying to run a cli command from @foal/cli using npx to avoid global installation.

Following the docs I should do the following:

$ npm install -g @foal/cli

$ foal createapp my-app

I'm trying to use npx to avoid global installation of package.

Following this article I tried the following:

$ npx -package @foal/cli foal createapp foal-test
npx: installed 203 in 27.122s
'foal' is not recognized as an internal or external command,
operable program or batch file.

Any idea how to achieve this?

like image 923
opensas Avatar asked Dec 15 '25 15:12

opensas


1 Answers

It should be npx --package or npx -p for short.

like image 142
Null Nobody Avatar answered Dec 18 '25 06:12

Null Nobody



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!