Melos
A tool for managing Dart and Flutter projects, with one or many packages.

About

Melos is a CLI tool used to help manage Dart and Flutter projects with multiple packages (also known as mono-repos). It is in active development and is in use on projects such as FlutterFire and Flame.

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. Melos helps solve these issues by allowing multiple packages to work together within one repository, whilst being totally independent of each other. Features include:

  • Automatic versioning & changelog generation.
  • Automated publishing of packages to pub.dev.
  • Local package linking and installation.
  • Executing simultaneous commands across packages.
  • Listing of local packages & their dependencies.

Melos also works great on CI/CD environments to help automate complex tasks and challenges. If you're using GitHub you can check out the Melos GitHub Action.

Melos is for applications just as much as it is for packages that are published to pub.dev. A workspace can contain your Flutter and Dart applications together with the internal packages that they share, and Melos will run your scripts, tests and analysis across all of them, generate IDE run configurations for the applications and version them, including the build number of a version like 1.2.3+45. Nothing has to be published to use Melos.

Melos is not limited to monorepos either. It works just as well in a repository with a single application or package, where you can still use features like versioning, changelog generation, publishing and scripts, see Single package projects.

How does Melos relate to other monorepo tools?

Melos is the monorepo tool for the Dart and Flutter ecosystem. If you are coming from another ecosystem, Melos is the Dart and Flutter alternative to tools like:

Melos combines these responsibilities in a single tool that understands Dart and Flutter packages, pubspec.yaml files and pub.dev, so that you can run scripts and commands across packages, filter packages, and version and publish them based on Conventional Commits.

Projects using Melos

The following projects are using Melos:

README Badge

Using Melos? Add a README badge to show it off:

melos
markdown
[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos)

License

See LICENSE for more information.