v0.0.3
OpenCode Backup & Removal Manager v0.0.3
π Major Release: Complete Architecture Refactor
This release brings significant improvements including a new unified dispatcher, shared library system, OpenCode installation capability, and interactive menu.
β¨ New Features
π§ Unified Dispatcher (opencode.sh)
- Single entry point for all OpenCode operations
- Interactive menu when run without arguments
- Command routing to backup, restore, install, and remove tools
- Consistent UX matching backup/removal scripts
π¦ OpenCode Installation
- Auto-detection of best installation method
- 8 installation methods supported:
brew(Homebrew - macOS/Linux, recommended)npm(Node.js package - any OS)scoop(Windows)choco(Chocolatey - Windows)paru(Arch Linux AUR)mise(Multi-language runtime)nix(Nix package manager)curl(YOLO installer)
- Interactive confirmation for curl installer
- Fallback options when package manager not detected
ποΈ Shared Library System (lib/common.sh)
- Centralized helpers for all scripts
- OS detection (Linux, macOS, Windows)
- Color helpers (info, success, warning, error)
- Command wrappers for safe execution
- Package manager detection
- Installation functions
π Interactive Menu
- Organized layout: Backup & Restore, Installation & Removal
- 6 main options: Create Backup, Restore, List Backups, Settings, Install, Remove
- Platform detection displayed in header
- Seamless navigation with clear prompts
π§ Improvements
Code Architecture
- Extracted shared logic into
lib/common.sh - Reduced code duplication across scripts
- Graceful fallback when library is missing (main scripts still work)
- Dispatcher enforces library presence for clean architecture
Documentation
- New architecture section explaining scripts structure
- Library system documentation with fallback behavior
- Installation guide with all supported methods
- Interactive mode documentation with menu examples
- Enhanced README with images and collapsible sections
- Updated QUICKSTART for dispatcher workflow
User Experience
- Single entry point for all operations
- No need to memorize command-line options
- Consistent menus across all scripts
- Clear error messages with actionable suggestions
π Breaking Changes
None. All existing command-line usage continues to work as before.
π Statistics
- 7 new commits since v0.0.1
- 1,034 lines added, 148 lines removed
- 9 files changed:
lib/common.sh(new file - shared library)opencode.sh(new file - dispatcher)opencode-backup.sh(refactored)opencode-removal.sh(refactored)- Documentation updates (README.md, QUICKSTART.md)
- New UI images (Backup.png, Removal.png, Icon.png)
π Usage Examples
Interactive Menu
./opencode.sh # Launch interactive menuCommand Line
./opencode.sh backup # Create backup
./opencode.sh restore # Restore backup
./opencode.sh install # Install OpenCode (auto-detect)
./opencode.sh install brew # Install via Homebrew
./opencode.sh remove --remove-all # Remove OpenCodeDirect Script Invocation (still supported)
./opencode-backup.sh backup
./opencode-removal.sh --helpπ Upgrade Instructions
Easiest Method (Download & Extract):
- Download the
Assetfile from this release - Extract the zip to your backup folder
- Overwrite existing files when prompted
- Done! All features are now available
Alternative (Git Pull):
cd /path/to/opencode-backups
git pull origin master
./opencode.sh # Try new interactive menu!π Bug Fixes
- Removal tool: Enhanced macOS-specific detection
- Removal tool: Added post-removal verification
π Acknowledgments
This release includes improvements based on user feedback for better workflow and ease of use.