opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: add uninstall command to remove OpenCode and clean up related files

Open kunaljaykam opened this issue 2 months ago • 0 comments

Fix for Issue https://github.com/sst/opencode/issues/3900

there's one more pr on the same issue but it didn't looked right: https://github.com/sst/opencode/pull/3904

Files created/modified:

  1. src/cli/cmd/uninstall.ts - New uninstall command implementation
  2. src/index.ts - Registered the UninstallCommand
  3. README.md - Added uninstall documentation section

Key features:

  • ✅ Confirmation dialog before uninstalling
  • ✅ Detects installation method (curl, npm, pnpm, bun, brew)
  • ✅ Handles curl installs by checking common binary locations
  • ✅ Option to keep user data with --keep-data
  • ✅ Friendly error messages and progress indicators
  • ✅ Thank you message with feedback link

kunaljaykam avatar Nov 04 '25 17:11 kunaljaykam