defang icon indicating copy to clipboard operation
defang copied to clipboard

npx defang install-cli

Open raphaeltm opened this issue 1 year ago • 2 comments

I know it's a bit "ouroboros" but I think it would be helpful to be able to do:

npx defang install-cli

That way someone can test the waters really easily and then if they want to cut down their commands by 4 keystrokes, they can run that once, and they're good to go.

Another advantage is that all our other installation methods either don't work across platforms, require less popular dependencies, or require users to do a bit more work/thinking. Given the relative ubiquity of node (especially with the current target audience) this would just make it easier to install across platforms.

I think the same command could be used to upgrade the CLI as well. (defang install-cli)

raphaeltm avatar May 01 '24 22:05 raphaeltm

This would also "fix" #310

lionello avatar May 03 '24 19:05 lionello

Also related to npx experience, from Lio:

  • wonder if there’s a way to force a fetch during installation?
  • something is swallowing the failures when [github.com](http://github.com/) is blocked

acote88 avatar May 09 '24 06:05 acote88

  • [ ] ~~npx defang should add the resulting binary to PATH~~
  • [x] Does npm install -g defang do the right thing?

lionello avatar Jun 26 '24 18:06 lionello

npm install -g defang will install a link to cli.js which will call the defang binary. The link name is "defang" and will be found in the system PATH. cli.js and will automatically get the latest version of the defang executable.

nullfunc avatar Jul 08 '24 21:07 nullfunc