Okay, so I’ve been messing around with Melos again, this time diving into version 3. Let me tell you, it’s been a journey, a bit bumpy but ultimately rewarding. I wanted to share my experience, just in case anyone else is going through the same thing.

Getting Started
First things first, I made sure my Flutter setup was up to date. You know, the usual, running `flutter doctor` to make sure everything is in order. Then, I grabbed the latest version of Melos itself. I’ve been burned before by not being on the newest version, so lesson learned there.
I already had a project I wanted to use Melos with – a monorepo with a couple of Flutter packages. It wasn’t super complex, but it was starting to get a bit unwieldy to manage manually.
The Setup Process
I started with initializing melos in the root of my project, using init command. The thing about melos init is you have to make sure the yaml file is up to snuff, before you initialize.
Then, I went through my `*` file. Now, this is where I stumbled a bit initially. The configuration options have changed a bit since I last seriously used Melos. I spent some time going through the documentation and figuring out how to properly define my packages and scripts.
Running the Scripts
Once I had the configuration sorted, I started experimenting with some scripts. This is where Melos really shines, in my opinion. I set up a simple script to run `flutter pub get` across all my packages. It was pretty basic:

- `melos run get_dependencies`
Running that was a breeze. Melos neatly executed the command in each package, one after the other. No more navigating between directories and running the same command multiple times. Big win!
Building and Testing
Next, I wanted to see how Melos handled building and testing. I added scripts for those, again referencing the Flutter commands I’d normally use. I was particularly interested in how it would manage dependencies between my packages. I had one package that depended on another, and I wanted to make sure it built in the correct order.
Melos handled it like a champ! It automatically detected the dependency and built the packages in the right sequence. No manual intervention needed. I felt a huge sense of relief – this was going to save me so much time and hassle.
What I Learned
So, after this little deep dive into Melos 3, here’s what I’ve taken away:
- Read the docs carefully: The configuration has changed, so don’t just assume you know how it works.
- Start small: Don’t try to do everything at once. Get a basic script working, then build from there.
- Embrace the automation: Melos is all about automating your workflow. Let it do the heavy lifting.
Overall, I’m really impressed with Melos 3. It’s a powerful tool that can significantly improve the developer experience for anyone working with Flutter monorepos. It’s definitely going to be a permanent part of my toolkit from now on. I’m not a pro, but this process make me feel easy to finish all these things.