goharbor / goharbor/harbor-cli
[feature]: Add a confirmation prompt before executing project deletion to prevent accidental destructive operations.
- Dominant language
- Go
- Stars
- 163
- Forks
- 211
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
## Problem
Currently, deleting projects using the Harbor CLI does not require confirmation.
This can lead to accidental deletion of projects, which is irreversible and may result in unintended data loss.
## Proposed Solution
Add a confirmation prompt before executing project deletion.
- Prompt user before deletion
- Display project name(s) or project ID in the prompt
- Abort operation if user declines
- Skip confirmation when `--force` flag is used
## Example Workflow
## Alternatives Considered
Users can manually double-check commands before execution, but this is error-prone and not reliable for destructive operations.
## Additional Context
Many CLI tools (e.g., kubectl, docker) include confirmation or safeguards for destructive actions.
This feature improves user safety and aligns Harbor CLI with common CLI UX practices.
Contributor guide
Assessment
This issue has not been assessed yet.