Navigating Monorepos with EasePublished See discussion on Twitter
A few years back now I wrote a short blog post sharing a shell function that made it easier to navigate Yarn v1 monorepos. I realized today that I haven't updated that post with a new function that works for Yarn berry (v2 and v3) releases.
Similar to that original snippet (which I've since re-named to
need to install
jq via homebrew (
brew), but once you've done that
you should be able to quickly run any script from any package without typing out
the whole workspace name or without changing into the directory for the
To "install" this, you can copy and paste the above snippet into your
.zshrc file (or whatever config file you use for your shell), and then
source that config (e.g.
source ~/.zshrc) in your terminal and you should be
able to use it!
Notably, this doesn't let you select multiple workspaces to run a command within, I may eventually package this up into a helpful package that you can install directly in your monorepo, akin to one of my older projects Zaps 🤔.
Also - if you still have some projects using yarn classic, I ended up renaming
yw script to