Feeling the Vibe
(edit, see update at the end)
The term vibe coding has been making waves recently, and i must admit, i was as worried and dismissive as anyone, but the tools are sure impressive. Not like you can give them all the work mindlessly, but they can do a lot, with only a limited amount of supervision, allowing to free up time to work on something else, even driving multiple of them at once.
There is the little problem of cost though, when using commercial tools, but this is not the problem we are solving today.
The other problem, is that if you want to work on two different things in the same repository, collisions are going to happen, unless you use git worktree, or similar tools, to have multiple copies of the code to work with, but that's a bit tedious to maintain, and takes time and space to setup.
That got me thinking about layers, like how docker build images in steps, and each step creates a file system layer only saving the files that are created/modified from the previous one, then presenting the result to the running container as a superposition of all of the layers. Could we use something similar?
Turns out on Linux you can mount an overlay with fuse-overlayfs
(combined lower/upper/work dirs), and on macOS you get similar behavior through APFS clone-on-write (via cp -c
), so with a little automation we can set up private, ephemeral views without touching the original source.
So with ChatGPT doing all the work, I threw around this little tool, ovlshell, usage is pretty brainless.
cd your_project
ovlshell # (or create an alias for it)
claude # or amp or codex or whatever tool you use, AI or not.
exit # or ctrl-d
# you will be prompted for deletion of the overlay directory structure,
# it's your responsibility to cleanup if you don't.
And while one session is chugging along in its isolated environment, you can start another in the same project directory, as all the changes are invisible to it, and another… and another, until you run out of tokens, money, memory, or brain capacity, that is.
Sessions live in directories in /tmp/
, they get a random cute name unless you give them a custom one, and the default command is your $SHELL
, but you can pass a custom one, while it's tempting to use claude
or whatever as the command, it means that exiting it would kill the session (though cleanup requires confirmation), and that might cause regret, so having a shell layer in the middle seems prudent.
update 04/09/2025: well, trying it on MacOs made me reassess the using git worktree as a backend, and i was wrong, it's a lot faster than i though it would be, the only problem i have with it is the UX, not the performance, so wrapping it in the interface of ovlshell (which still needs a better name though), is still a good move.