mappdate: macOS Updates CLI
A command-line interface tool written in Go that allows you to list and install macOS system updates directly from your terminal. This tool provides an interactive interface to select and manage system updates without leaving the command line.
Features
- 📋 List all available macOS system updates
- 🔍 View detailed information about each update (version, size, description)
- ✨ Interactive selection menu for choosing updates
- 📦 Install multiple updates in one go
- 🚦 Real-time progress tracking for installations
- ⚠️ Error handling and status reporting
Prerequisites
- macOS operating system
- Go 1.16 or later
- Administrative privileges (sudo access)
Installation
- Clone the repository:
git clone https://github.com/yourusername/mappdate.git
cd mmappdate
- Install the required dependency:
go get github.com/manifoldco/promptui
- Build the application:
go build mappdate.go
Usage
Run the program with sudo privileges:
sudo ./updates
The program will:
- Check for available updates
- Display an interactive menu with all available updates
- Allow you to select multiple updates using space bar
- Install selected updates with progress tracking
↑
/↓
: Navigate through updates
space
: Select/deselect an update
enter
: Confirm selection and start installation
ctrl+c
: Exit the program
Example Output
Available Updates:
* macOS Ventura 13.4.1 (Version: 13.4.1, Size: 3.2GB)
A critical update for your Mac that includes security fixes...
* Safari 16.5.2 (Version: 16.5.2, Size: 89.3MB)
Important security and stability updates...
Select updates to install (use space to select, enter to confirm)
> [x] macOS Ventura 13.4.1
[ ] Safari 16.5.2
Installing selected updates...
Installing macOS Ventura 13.4.1...
Successfully installed macOS Ventura 13.4.1
Error Handling
The program includes comprehensive error handling for common scenarios:
- Insufficient privileges
- Network connectivity issues
- Invalid update selections
- Installation failures
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
)
- Commit your changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Uses the
softwareupdate
command-line tool provided by Apple
- Interactive menu powered by promptui
Security Note
This application requires sudo privileges to function properly as system updates on macOS can only be installed with administrative access. Always review the source code of applications that require sudo privileges before running them.
Support
If you encounter any issues or have questions, please file an issue in the GitHub repository.