kamiazya/scopes
Implement proper interactive confirmation for CLI commands
オープン
#135 opened on 2025/08/31
good first issuehacktoberfest
Repository metrics
- Stars
- (2 個のスター)
- PR merge metrics
- (PR metrics pending)
説明
Background
As identified in PR #110 review, the current implementation for confirmation in CLI commands (e.g., RmCommand) is not interactive. It simply prints a message and exits, forcing the user to re-run the command with --force.
Problem
- Poor user experience requiring command re-execution
- Not truly interactive confirmation
- Inconsistent with typical CLI behavior
Proposed Solution
Use Clikt's built-in confirm() function for interactive prompts. This will:
- Ask the user for confirmation
- Proceed based on their input
- Provide a better user experience
Example Implementation
if (\!force) {
confirm("Are you sure you want to remove aspect '$key'? This action cannot be undone.", abort = true)
}
Files Affected
interfaces/cli/src/main/kotlin/io/github/kamiazya/scopes/interfaces/cli/commands/aspect/RmCommand.kt- Other CLI commands that require confirmation
Priority
Low - This is a UX improvement that doesn't affect functionality