kamiazya/scopes

Implement proper interactive confirmation for CLI commands

Open

#135 opened on Aug 31, 2025

 (0 comments) (0 reactions) (0 assignees)Kotlin (3 forks)auto 404
good first issuehacktoberfest

Repository metrics

Stars
 (2 stars)
PR merge metrics
 (PR metrics pending)

Description

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

Contributor guide