A collection of shell scripts for managing Flutter projects efficiently on macOS. An alternative to Melos or Puby.
- Automatic detection of all Flutter projects in your directory
- Deep cleaning of Flutter projects
- Runs
flutter clean
in all projects - Removes native build files and dependencies
- Cleans iOS, Android, and macOS artifacts
- Runs
- Smart package management
- Runs
flutter pub get
in all projects - Optional CocoaPods support for iOS
- Runs
- Project reset functionality
- Combined clean and package retrieval
- Maintains proper order of operations
- Verbose mode for detailed output
- Proper error handling and reporting
- Progress tracking with timing information
-
Place all three scripts in your root project directory:
flutter_clean.sh
flutter_get.sh
flutter_reset.sh
-
Make the scripts executable:
chmod +x flutter_clean.sh flutter_get.sh flutter_reset.sh
./flutter_clean.sh [options]
Options:
-d, --deep
Deep clean all Flutter projects (default: true)-v, --verbose
Show detailed output-h, --help
Show help message--version
Show version information
Examples:
./flutter_clean.sh # Deep clean all Flutter projects
./flutter_clean.sh -d false # Clean only the current Flutter project
./flutter_clean.sh -v # Deep clean with verbose output
./flutter_get.sh [options]
Options:
-p, --pod
Run 'pod install' for iOS after getting packages-v, --verbose
Show detailed output-h, --help
Show help message--version
Show version information
Examples:
./flutter_get.sh # Get packages for all Flutter projects
./flutter_get.sh -p # Get packages and run pod install
./flutter_get.sh -p -v # Get packages and run pod install with verbose output
./flutter_reset.sh [options]
Options:
-v, --verbose
Show detailed output-h, --help
Show help message--version
Show version information
Examples:
./flutter_reset.sh # Reset all Flutter projects
./flutter_reset.sh -v # Reset with verbose output
The scripts clean the following files and directories:
- iOS related:
ios/Pods
ios/Podfile.lock
ios/.symlinks
ios/Flutter/Flutter.framework
ios/Flutter/Flutter.podspec
- Android related:
android/.gradle
android/build
android/app/build
android/local.properties
- Flutter/Dart related:
build/
.dart_tool/
pubspec.lock
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache
.pub
- macOS related:
macos/Pods
macos/Podfile.lock
macos/.symlinks
- Other:
coverage/
doc/
*.iml
*.log
- Flutter SDK installed and in PATH
- bash shell
- CocoaPods (optional, for iOS development)
The project includes a comprehensive test suite using Bash Automated Testing System (BATS). To run the tests:
-
Install BATS:
brew install bats-core
-
Run the test suite:
cd tests bats *.bats
The test suite includes:
- Unit tests for all scripts
- Mock Flutter project environment
- Command-line argument testing
- Error handling verification
- Output format validation
This project is licensed under the MIT License - see the LICENSE file for details.
This README was generated using Windsurf.