Skip to content

Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.

docs: document uninstallation instructions and add interactive prompt to windows installer

Samir Hossains7ae57dda85f8
diff --git a/README.md b/README.md
index a4b972d..566becf 100644
--- a/README.md
+++ b/README.md
@@ -98,6 +98,31 @@ sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive-file> -R mesamirh/MovieBox-Tui
```
+</details>
+<details>
+<summary><b>Uninstallation</b></summary>
+
+#### Automated Installer (macOS, Linux, Windows, Android)
+
+Simply re-run your original install command (`curl ... | bash` or `irm ... | iex`). When MovieBox-TUI is already installed, the installer automatically detects it and displays an interactive menu:
+
+```text
+MovieBox-TUI is already installed.
+What would you like to do?
+ 1) Reinstall / Update to latest version
+ 2) Uninstall
+ 3) Cancel
+```
+
+Enter `2` to completely remove MovieBox-TUI.
+
+#### Package Managers
+
+```bash
+brew uninstall moviebox-tui # Homebrew (macOS)
+cargo uninstall moviebox-tui # Cargo
+```
+
</details>
## Quick Start
diff --git a/docs/installation.md b/docs/installation.md
index 2a66038..abf4a46 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -82,3 +82,27 @@ All release assets include cryptographically signed SHA-256 checksums and GitHub
sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify <archive-file> -R mesamirh/MovieBox-Tui
```
+---
+
+## Uninstallation
+
+### Automated Installer (macOS, Linux, Windows, Android)
+
+Simply re-run your original install command (`curl ... | bash` or `irm ... | iex`). When MovieBox-TUI is already installed, the installer automatically detects it and displays an interactive menu:
+
+```text
+MovieBox-TUI is already installed.
+What would you like to do?
+ 1) Reinstall / Update to latest version
+ 2) Uninstall
+ 3) Cancel
+```
+
+Enter `2` to completely remove MovieBox-TUI from your system.
+
+### Package Managers
+
+```bash
+brew uninstall moviebox-tui # Homebrew (macOS)
+cargo uninstall moviebox-tui # Cargo
+```
diff --git a/install.ps1 b/install.ps1
index b1a4099..482b170 100644
--- a/install.ps1
+++ b/install.ps1
@@ -244,16 +244,37 @@ $EffectiveInstallDir = if ($InstallDir) { $InstallDir } else { $DefaultInstallDi
$ExePath = Join-Path $EffectiveInstallDir $BinName
if (Test-Path $ExePath) {
- try {
- $CurrentVerOutput = (& $ExePath --version 2>&1 | Out-String)
- if ($CurrentVerOutput -match "moviebox-tui\s+([\d\.]+)") {
- $CurrentVer = "v" + $matches[1]
- if ($CurrentVer -eq $TargetVersion -and (-not $Force)) {
- Write-Success "MovieBox-TUI $TargetVersion is already installed at $ExePath. Use -Force to reinstall."
+ if (-not $Force) {
+ $IsInteractive = [Environment]::UserInteractive -and (-not [Console]::IsInputRedirected)
+ if ($IsInteractive) {
+ Write-Host ""
+ Write-Warn "$AppName is already installed at $ExePath"
+ Write-Host " What would you like to do?"
+ Write-Host " 1) Reinstall / Update to latest version"
+ Write-Host " 2) Uninstall"
+ Write-Host " 3) Cancel"
+ Write-Host ""
+ $Choice = Read-Host " Enter choice [1-3] (default 1)"
+ if ($Choice -eq "2") {
+ Do-Uninstall
+ exit 0
+ } elseif ($Choice -eq "3") {
+ Write-Success "No changes made. Exiting."
exit 0
}
+ } else {
+ try {
+ $CurrentVerOutput = (& $ExePath --version 2>&1 | Out-String)
+ if ($CurrentVerOutput -match "moviebox-tui\s+([\d\.]+)") {
+ $CurrentVer = "v" + $matches[1]
+ if ($CurrentVer -eq $TargetVersion) {
+ Write-Success "MovieBox-TUI $TargetVersion is already installed at $ExePath. Use -Force to reinstall."
+ exit 0
+ }
+ }
+ } catch {}
}
- } catch {}
+ }
}
if ($DryRun) {