Enhancement for non-interactive use cases
LinuxSuRen opened this issue · comments
Rick commented
Clear and concise description of the problem
For non-interaceive use cases, it would be great if there is a flag to skip any potential prompt. For instance, it will let user to do the following choice if the pnpm
does not exist:
Would you like to globally install pnpm?
In the CI situation, usually there is no user interactives.
Suggested solution
Please feel free to see also the following example usage:
ni -i=false # -i means --interactive
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Anthony Fu commented
We should already handle CI:
https://github.com/antfu/ni/blob/c200dc2f0f171d97be454b9b0ba948e8a6c5f520/src/detect.ts#L59-L60
Or what's your use case?
Rick commented
In my case, I wish ni
could install an agent automatically. So, how to set autoInstall
?
Anthony Fu commented
You can run nci
which installs agent automatically
Rick commented
This is what I need. Thanks for your help.