From 75db9c2ec9ffd6bd5bb9eab86ffd8026dbb0c89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davor=20Raci=C4=87?= Date: Sat, 14 Feb 2026 17:56:13 +0100 Subject: [PATCH] feat(cli): add destructive action warning and confirm before uninstall Move warning box after component selection and add a confirmation prompt defaulting to No, so users see the irreversibility warning right before the point of no return. Non-interactive --yes mode skips both. Co-Authored-By: Claude Opus 4.6 --- tools/cli/commands/uninstall.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tools/cli/commands/uninstall.js b/tools/cli/commands/uninstall.js index 32cd576b2..99734791e 100644 --- a/tools/cli/commands/uninstall.js +++ b/tools/cli/commands/uninstall.js @@ -95,6 +95,26 @@ module.exports = { removeModules = selected.includes('modules'); removeIdeConfigs = selected.includes('ide'); removeOutputFolder = selected.includes('output'); + + const red = (s) => `\u001B[31m${s}\u001B[0m`; + await prompts.note( + red('💀 This action is IRREVERSIBLE! Removed files cannot be recovered!') + + '\n' + + red('💀 IDE configurations and modules will need to be reinstalled.') + + '\n' + + red('💀 User artifacts are preserved unless explicitly selected.'), + '!! DESTRUCTIVE ACTION !!', + ); + + const confirmed = await prompts.confirm({ + message: 'Proceed with uninstall?', + default: false, + }); + + if (!confirmed) { + await prompts.outro('Uninstall cancelled.'); + process.exit(0); + } } // Phase 1: IDE integrations