Abhishek-Mallick/universal-box

Feature: Undo / Clean Command - `universal-box clean <projectName>`

開放

#231 建立於 2025年10月4日

 (2 則留言) (0 個反應) (1 位負責人)JavaScript (41 個分叉)auto 404
enhancementhacktoberfest

倉庫指標

星標
 (49 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Feature Request

Is your feature request related to a problem you're trying to solve with Universal-Box? Please describe. When a user initializes a project using universal-box init, they might realize they selected the wrong template, used the wrong directory, or want to abort setup midway. Currently, there’s no built-in way to easily undo or clean up previously scaffolded files — the user must manually delete the project folder.

Describe the solution you'd like Introduce a new CLI command:

universal-box clean <projectName>

This command would:

  • Safely delete the generated project folder and all its contents.
  • Optionally ask for confirmation before deletion (e.g., “Are you sure you want to remove this project?”).
  • Support a --force flag to skip confirmation for automation workflows.

Example usage:

universal-box clean my-app
# or
universal-box clean my-app --force

Describe alternatives you've considered

  • Manually deleting folders using file explorer or shell commands.
  • Adding a cleanup flag within init (but that would mix creation and deletion logic).

How would this feature improve Universal-Box? This feature adds convenience and improves developer productivity by giving users a quick way to roll back failed or incorrect scaffolds. It also makes Universal-Box safer to experiment with — users can test multiple templates and clean up with a single command.

Additional context NA

貢獻者指南