Skip to content

feat: add interactive mode (-it) support for per-folder deletion confirmation and --help flag for the usage manual - #7

Open
Tahsin005 wants to merge 2 commits into
mdsiaofficial:devfrom
Tahsin005:dev
Open

feat: add interactive mode (-it) support for per-folder deletion confirmation and --help flag for the usage manual#7
Tahsin005 wants to merge 2 commits into
mdsiaofficial:devfrom
Tahsin005:dev

Conversation

@Tahsin005

Copy link
Copy Markdown

What's Changed

Added two new flags to both the Node.js and C versions of nmclean.

-it (Interactive Mode)

By default, nmclean runs autonomously and deletes all node_modules folders without any prompts. With -it, the tool pauses at each found folder and asks the user for confirmation before deleting.

Accepted inputs:

  • Confirm -> y, Y, yes, YES, Yes — or just press Enter
  • Skip -> n, N, no, NO, No

-h / --help

Prints a formatted usage manual to the terminal and exits. Covers all available flags, behavior, examples, and interactive prompt inputs.

How to Test

Auto mode (existing behavior, unchanged)

nmclean

Interactive mode

nmclean -it

Help manual

nmclean --help
nmclean -h

Changes

  • index.js — added -it and --help/-h flag parsing and confirm() prompt helper
  • nmclean.c — same flags implemented in C with confirm() using stdin and manual ANSI coloring
  • README.md — updated with options table, per-flag sections with example outputs, and accepted input table for interactive mode

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

Successfully merging this pull request may close these issues.

2 participants