kamiazya/scopes

Implement proper interactive confirmation for CLI commands

Offen

#135 geöffnet am 31.08.2025

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Kotlin (3 Forks)auto 404
good first issuehacktoberfest

Repository-Metriken

Stars
 (2 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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