Abhishek-Mallick / Abhishek-Mallick/universal-box

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

Offen
#231 2 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @dthlss26 Auf GitHub ansehen
enhancement hacktoberfest
Vorherrschende Sprache
JavaScript
Sterne
47
Forks
41
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## 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
```
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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Look at the existing command structure in the codebase, likely in a `src/commands/` or `lib/` directory. Find where `init` is implemented to understand how project folders are created. The new `clean` command needs to locate and delete the specified project directory, with optional confirmation. Check for existing utilities for file operations and user prompts. A good starting point is to run the existing CLI and see how commands are parsed and executed.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cli, javascript, node.js
Bereich
cli, developer-experience
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.