🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
1,486
stars
748
commits
Dart
primary language
Sep 10, 2026
updated
A tool for managing Dart projects with multiple packages, inspired by Lerna.
Documentation • License
Splitting up large code bases into separate independently versioned packages is extremely useful for code sharing. However, making changes across many repositories is messy and difficult to track, and testing across repositories gets complicated really fast.
To solve these (and many other) problems, some projects will organize their code bases into multi-package repositories (sometimes called monorepos)
Melos is a tool that optimizes the workflow around managing multi-package repositories with git and Pub.
Since the pub workspaces feature has
been released, Melos has been updated to rely on that, instead of creating
pubspec_overrides.yaml files and thus some migration is needed.
The main difference for migration is that the melos.yaml file no longer
exists, only the root pubspec.yaml file.
To migrate to Melos 7.x.x a few steps are needed:
melos clean to remove all the pubspec_overrides.yaml
entries and then continue with moving all your content.resolution: workspace to all of your packages' pubspec.yaml files.pubspec.yaml file, under the
workspace key.melos.yaml file to the root pubspec.yaml
file, under the melos key. (Note that the packages list is no longer
needed as it is replaced with the workspace list.)[!NOTE] The
workspacelist doesn't support globs yet, so you have to list all your packages manually. Give a thumbs up here so that the team can prioritize this feature.
[!NOTE] Root packages migration: If your existing project uses the repository root as a package, you can enable
useRootAsPackage: truein the melos configuration to maintain this behavior, or restructure your project to move the main application to a subdirectory. See the Configuration Overview for details.
After the migration, your root pubspec.yaml file would now look something
like this:
name: my_workspace
publish_to: none
environment:
sdk: ^3.9.0
workspace:
- packages/helper
- packages/client_package
- packages/server_package
dev_dependencies:
melos: ^7.0.0-dev.9
melos:
# All of the content of your previous melos.yaml file
# (Except for the packages and name)
And this is what the pubspec.yaml file of a package would look like:
name: my_package
environment:
sdk: ^3.9.0
resolution: workspace
[!NOTE] You have to use Dart SDK 3.6.0 or newer to use pub workspaces.
If you're planning on using Melos in your GitHub Actions workflows, you can use the Melos Action to run Melos commands, this action also supports automatic versioning and publishing directly from your workflows.
A default file structure looks something like this:
my-melos-repo/
pubspec.yaml
packages/
package-1/
pubspec.yaml
package-2/
pubspec.yaml
The location of your packages needs be configured via the workspace
section in your root pubspec.yaml file, see the
pub workspaces documentation for more
information.
pubspec.yaml configuration to use via melos run [scriptName]. Anyone
contributing to your workspace can just run melos run to be prompted to
select a script from a list with descriptions of each script.
melos exec -- <command here> with additional concurrency and fail-fast
options.
--no-private
publish_to: none).--[no-]published
--[no-]nullsafety
--[no-]flutter
--scope=<glob>
--ignore=<glob>
--diff=<ref>
ref,
e.g. a commit sha or git tag.--dir-exists=<dirRelativeToPackageRoot>
--file-exists=<fileRelativeToPackageRoot>
--depends-on=<dependantPackageName>
--no-depends-on=<noDependantPackageName>
--include-dependencies
--include-dependents
Go to the Getting Started page of the documentation to start using Melos.
The following projects are using Melos:
Submit a PR if you'd like to add your project to the list. Update the README.md and the docs.
You can also add a README badge to your projects README to let others know about Melos đź’™.
Documentation is available at https://melos.invertase.dev.
When migrating between major versions of Melos, please read the migration guide.
Full commands list and args can be viewed by running melos --help.
> melos --help
A CLI tool for managing Dart & Flutter projects with multiple packages.
Usage: melos <command> [arguments]
Global options:
-h, --help Print this usage information.
--verbose Enable verbose logging.
--sdk-path Path to the Dart/Flutter SDK that should be used. This command line option has
precedence over the `sdkPath` option in the root `pubspec.yaml` configuration
file and the `MELOS_SDK_PATH` environment variable. To use the system-wide SDK,
provide the special value "auto".
Available commands:
bootstrap Initialize the workspace, link local packages together and install remaining package
dependencies. Supports all package filtering options.
changed List local packages that have changed since a git commit or tag, by default since the
latest release tag of each package. Supports all package filtering options, except
--diff, which is given as the argument of this command.
clean Clean this workspace and all packages. This deletes the temporary pub & ide files such
as ".packages" & ".flutter-plugins". Supports all package filtering options.
exec Execute an arbitrary command in each package. Supports all package filtering options.
format Idiomatically format Dart source code.
list List local packages in various output formats. Supports all package filtering options.
publish Publish any unpublished packages or package versions in your repository to pub.dev. Dry
run is on by default.
run Run a script by name defined in the workspace pubspec.yaml config file.
version Automatically version and generate changelogs based on the Conventional Commits
specification. Supports all package filtering options.
Run "melos help <command>" for more information about a command.
To start making contributions please refer to
CONTRIBUTING.md.
This project is heavily inspired by Lerna.
Using Melos? Add a README badge to show it off:
[](https://github.com/invertase/melos)
Built and maintained with đź’› by Invertase.
Dart
99.1%
🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
1,486
stars
748
commits
Dart
primary language
Sep 10, 2026
updated
A tool for managing Dart projects with multiple packages, inspired by Lerna.
Documentation • License
Splitting up large code bases into separate independently versioned packages is extremely useful for code sharing. However, making changes across many repositories is messy and difficult to track, and testing across repositories gets complicated really fast.
To solve these (and many other) problems, some projects will organize their code bases into multi-package repositories (sometimes called monorepos)
Melos is a tool that optimizes the workflow around managing multi-package repositories with git and Pub.
Since the pub workspaces feature has
been released, Melos has been updated to rely on that, instead of creating
pubspec_overrides.yaml files and thus some migration is needed.
The main difference for migration is that the melos.yaml file no longer
exists, only the root pubspec.yaml file.
To migrate to Melos 7.x.x a few steps are needed:
melos clean to remove all the pubspec_overrides.yaml
entries and then continue with moving all your content.resolution: workspace to all of your packages' pubspec.yaml files.pubspec.yaml file, under the
workspace key.melos.yaml file to the root pubspec.yaml
file, under the melos key. (Note that the packages list is no longer
needed as it is replaced with the workspace list.)[!NOTE] The
workspacelist doesn't support globs yet, so you have to list all your packages manually. Give a thumbs up here so that the team can prioritize this feature.
[!NOTE] Root packages migration: If your existing project uses the repository root as a package, you can enable
useRootAsPackage: truein the melos configuration to maintain this behavior, or restructure your project to move the main application to a subdirectory. See the Configuration Overview for details.
After the migration, your root pubspec.yaml file would now look something
like this:
name: my_workspace
publish_to: none
environment:
sdk: ^3.9.0
workspace:
- packages/helper
- packages/client_package
- packages/server_package
dev_dependencies:
melos: ^7.0.0-dev.9
melos:
# All of the content of your previous melos.yaml file
# (Except for the packages and name)
And this is what the pubspec.yaml file of a package would look like:
name: my_package
environment:
sdk: ^3.9.0
resolution: workspace
[!NOTE] You have to use Dart SDK 3.6.0 or newer to use pub workspaces.
If you're planning on using Melos in your GitHub Actions workflows, you can use the Melos Action to run Melos commands, this action also supports automatic versioning and publishing directly from your workflows.
A default file structure looks something like this:
my-melos-repo/
pubspec.yaml
packages/
package-1/
pubspec.yaml
package-2/
pubspec.yaml
The location of your packages needs be configured via the workspace
section in your root pubspec.yaml file, see the
pub workspaces documentation for more
information.
pubspec.yaml configuration to use via melos run [scriptName]. Anyone
contributing to your workspace can just run melos run to be prompted to
select a script from a list with descriptions of each script.
melos exec -- <command here> with additional concurrency and fail-fast
options.
--no-private
publish_to: none).--[no-]published
--[no-]nullsafety
--[no-]flutter
--scope=<glob>
--ignore=<glob>
--diff=<ref>
ref,
e.g. a commit sha or git tag.--dir-exists=<dirRelativeToPackageRoot>
--file-exists=<fileRelativeToPackageRoot>
--depends-on=<dependantPackageName>
--no-depends-on=<noDependantPackageName>
--include-dependencies
--include-dependents
Go to the Getting Started page of the documentation to start using Melos.
The following projects are using Melos:
Submit a PR if you'd like to add your project to the list. Update the README.md and the docs.
You can also add a README badge to your projects README to let others know about Melos đź’™.
Documentation is available at https://melos.invertase.dev.
When migrating between major versions of Melos, please read the migration guide.
Full commands list and args can be viewed by running melos --help.
> melos --help
A CLI tool for managing Dart & Flutter projects with multiple packages.
Usage: melos <command> [arguments]
Global options:
-h, --help Print this usage information.
--verbose Enable verbose logging.
--sdk-path Path to the Dart/Flutter SDK that should be used. This command line option has
precedence over the `sdkPath` option in the root `pubspec.yaml` configuration
file and the `MELOS_SDK_PATH` environment variable. To use the system-wide SDK,
provide the special value "auto".
Available commands:
bootstrap Initialize the workspace, link local packages together and install remaining package
dependencies. Supports all package filtering options.
changed List local packages that have changed since a git commit or tag, by default since the
latest release tag of each package. Supports all package filtering options, except
--diff, which is given as the argument of this command.
clean Clean this workspace and all packages. This deletes the temporary pub & ide files such
as ".packages" & ".flutter-plugins". Supports all package filtering options.
exec Execute an arbitrary command in each package. Supports all package filtering options.
format Idiomatically format Dart source code.
list List local packages in various output formats. Supports all package filtering options.
publish Publish any unpublished packages or package versions in your repository to pub.dev. Dry
run is on by default.
run Run a script by name defined in the workspace pubspec.yaml config file.
version Automatically version and generate changelogs based on the Conventional Commits
specification. Supports all package filtering options.
Run "melos help <command>" for more information about a command.
To start making contributions please refer to
CONTRIBUTING.md.
This project is heavily inspired by Lerna.
Using Melos? Add a README badge to show it off:
[](https://github.com/invertase/melos)
Built and maintained with đź’› by Invertase.
Dart
99.1%