npx defang install-cli
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)
This would also "fix" #310
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
- [ ] ~~
npx defangshould add the resulting binary toPATH~~ - [x] Does
npm install -g defangdo the right thing?
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.