Each Melos command can be used alongside the following global filters:
Exclude private packages (
publish_to: none). They are included by default.
melos bootstrap --no-private
Filter packages where the current local package version exists on pub.dev.
melos bootstrap --published
--no-published to filter packages that have not had their current version
Include only packages with names matching the given glob. This option can be repeated.
# Run `flutter build ios` on all packages with "example" in the package name melos exec --scope="*example*" -- flutter build ios
Exclude packages with names matching the given glob. This option can be repeated.
# Run `flutter build ios` on all packages but ignore those whose packages names contain "internal" melos exec --ignore="*internal*" -- flutter build ios
Filter packages based on whether there were changes between a commit and the current HEAD or within a range of commits.
A range of commits can be specified using the git short hand syntax
# Run `flutter build ios` on all packages that are different between current # branch and the specified commit hash. melos exec --diff=<commit hash> -- flutter build ios # Run `flutter build ios` on all packages that are different between remote # `main` branch and HEAD. melos exec --diff=origin/main...HEAD -- flutter build ios
Include only packages where a specific directory exists inside the package.
# Only bootstrap packages with an example directory melos bootstrap --dir-exists="example"
Include only packages where a specific file exists in the package.
# Only bootstrap packages with an README.md file melos bootstrap --file-exists="README.md"
Filter packages where the package depends on the Flutter SDK.
melos exec --flutter -- flutter test
--no-flutter to filter packages that do not depend on the Flutter SDK.
Include only packages that depend on specific dependencies.
melos exec --depends-on="flutter" --depends-on="firebase_core" -- flutter test
--no-depends-on to filter packages that do not depend on the given