antfu-collective / ni

💡 Use the right package manager
MIT License
6.25k stars 208 forks source link

feat: interactive package management #202

Closed gearonix closed 2 months ago

gearonix commented 7 months ago

Description

This PR adds features such as:

ni -

# install the last 
# uninstalled package
nun -

# uninstall the last 
# installed package

This is useful in cases where we install a library just to check if it works for us or not.


ni lodash # the library did not fit, so we decided to remove it
nun - # lodash removed
ni - # lodash installed again

Interactive uninstall

2024-02-03_10-52

Multiple dependencies:

2024-02-03_10-52_1

Interactive install with search in npmjs registry

2024-02-03_10-53 2024-02-03_11-21

You can click on one of the found packages (ctrl + click, terminal link) to quickly find github for the selected package, or it's npmjs.com. No more google searches like "some package npmjs" or "some package github". so yeah

antfu commented 2 months ago

Thanks for the awesome PR - sorry I didn't saw it until now

antfu commented 2 months ago

Thank you!