Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow deletion without using TUI #188

Open
michaelchadwick opened this issue Jul 16, 2024 · 2 comments
Open

allow deletion without using TUI #188

michaelchadwick opened this issue Jul 16, 2024 · 2 comments

Comments

@michaelchadwick
Copy link

Problem
It would be nice to be able to use npkill without using the TUI as it is a potential extra step/click/key and a slight(:-P) performance impediment.

Solution
Add a command line argument that skips the UI, runs npkill deletion service, and displays results on command line.

Alternative
The best set of arguments I have found thus far is npx npkill -D -x -y -nu which deletes node_modules, skips hidden stuff, auto-confirms, doesn't check for updates, but still requires an exit of the TUI.

@mfer725
Copy link

mfer725 commented Jul 21, 2024

Great suggestion, I need this too, especially in the CI process, where it is necessary to automatically execute the subsequent scripts.

@craigryan
Copy link

I have a similar requirement, to have a proper non-interactive mode so i can call this as a CI script. The -D option suggests non-interactive but we also define the -y option. This is described as "Avoid displaying a warning when executing --delete-all" rather than acting as a non-interactive input mode.

A simple test is to pipe npkill through cat (npkill | cat) which confirms the command needs a TTY: "Oh no! Npkill does not support this terminal (TTY is required). This is a bug, which has to be fixed. Please try another command interpreter (for example, CMD in windows)".

It would be great to remove this condition and fix the bug as mentioned, (with -D and/or -y) to run non interactively. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants