Virtual monorepo: unify multiple WSL2 repos in one workspace
Managing three interconnected projects—a blog, a video automation tool, and a webhook receiver—inside WSL2 felt like juggling with one hand tied behind my back. I was constantly switching terminal windows and IDE instances, breaking my flow and preventing my AI coding assistants from seeing the "big picture" of how my system actually worked. Today, I finally stopped the madness by building a "Virtual Monorepo"—a single entry point that unifies my entire stack without breaking my git repositories.
What Happened
I started this session with a clear goal: I wanted my Google Antigravity IDE (a VS Code fork) to treat my three separate projects (astro3, video-automation, and webhook) as one cohesive unit.
My first instinct was to just "Add Folder to Workspace," but that felt disjointed. My AI agent treated them as separate islands. I needed something better.
The "Hub" Strategy
I decided to create a master directory called ~/antigravity-hub. The plan was simple: instead of moving my code, I would create symbolic links (symlinks) inside the Hub that pointed to my actual project folders.
# The magic command
ln -s ~/projects/astro3 ./astro3
The "Invisible File" Glitch
This is where I hit the classic WSL2 wall. I created the links in the terminal, and ls -la showed them perfectly. But when I opened Antigravity, the sidebar was completely empty.
I refreshed. I reloaded. Nothing.
It turned out I was falling into the "Hybrid Trap." My IDE was running in Windows mode (using PowerShell), trying to look at a Linux file system. Windows saw the Linux symlinks and essentially said, "I don't know what this is," so it treated them as invisible.
The Fix
The solution wasn't to change the files, but to change the viewer. I used the command palette to run "Remote-WSL: Connect to WSL".
Instantly, the IDE rebooted inside the Linux environment. The sidebar populated, the terminal switched to Bash, and suddenly my three separate projects looked like one giant monorepo.
Lesson: What I Learned
1. Context is King for AI
By using this "Symlink Aggregator" pattern, I realized that AI agents work exponentially better when they share a root folder. Now, when I ask the agent to "update the blog based on the video script," it can actually read the video script because it's just a folder away (../video-automation).
2. WSL Modes Matter
I learned that just because I can see files in the terminal doesn't mean my IDE sees them. VS Code (and Antigravity) has two modes:
- Local (Windows): Good for C:\ drives, bad for symlinks.
- Remote (WSL): Essential for Linux development. If you are working in WSL, you must force the IDE to connect to the distro, or you're fighting a losing battle against the file system.
Action: What You Can Do Now
If you are juggling multiple repos that talk to each other, don't just open multiple windows.
- Create a Hub: Make a folder like
~/my-workspace. - Link, Don't Move: Use
ln -sto link your active projects into that folder. - Go Remote: Ensure your IDE is connected to WSL (
Remote-WSL: Connect to WSL). - Automate: Add a
workflow.shscript in the root to control all three projects from one menu.
Now, instead of three disconnected islands, I have one command center.