opencode
opencode copied to clipboard
feat: add uninstall command to remove OpenCode and clean up related files
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:
- src/cli/cmd/uninstall.ts - New uninstall command implementation
- src/index.ts - Registered the UninstallCommand
- 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