Shuru is a lightweight sandbox that spins up Linux VMs on macOS using Apple's Virtualization.framework. Boots in about a second on Apple Silicon, and everything is ephemeral by default. There's a checkpoint system for when you do want to persist state, and sandboxes run without network access unless you explicitly allow it.
Single Rust binary, no dependencies.
Built it for sandboxing AI agent code execution, but it works well for anything where you need a disposable Linux environment.
The value here isn't 'local VMs'. it's that the defaults are inverted. Everything else defaults to persistent and networked. This defaults to ephemeral and isolated. Small shift, but matters when you don't trust the code that's about to run.
yeah, it just means everything runs on your machine. there are services like E2B, sprites.dev and others that give you sandboxes in the cloud. shuru runs VMs locally using Apple's Virtualization.framework, so nothing leaves your Mac.
Yes, but we have a perfectly serviceable term for local software already: "local software".
To me, "local-first software" means something slightly different. The term was coined by this essay[1], which says:
> Local-first ideals include the ability to work offline and collaborate across multiple devices
> This means that while local-first apps keep their data in local storage on each device, it is also necessary for that data to be synchronized across all of the devices on which a user does their work.
But this is clearly not what's going on here. This project is just local software, like we've had forever.
If a fancy new "local first" buzzword makes local-only software seem more sexy, then I suppose I don't want to get too mad about it. I really like local software. But the autist in me likes it when technical terms have a well defined meaning.
It's a good article and seems to mirror my experience doing partial-AI software development. If you are not saving your context for decision making and your conclusions in software architecture (as made between developers and AI) you are losing very valuable context information on software design. Although I'm not sure the article ties closely to the topic of micro VMs.
This looks amazing. I’ve been wanting virtualization.framework micro VMs for months! Docker is fine, but the overhead isn’t ideal.
I like the defaults (ephemeral, network off). Any thoughts on adding host-mapped directories?
I have a MCP server for ephemeral sandboxes that supports various backends (Docker, E2B, Modal, even WASM). I’ll look at adding this. https://github.com/Kiln-AI/Kilntainers
Shuru looks cool! I've been working on something with a similar vibe, for Linux hosts first; MicroVMs, default offline, etc. Not ready to release, but I'm starting to dogfood it.
Very cool. Was looking for something like this for a new project of mine. (I'm working on a project that is like a marriage of retool+OpenClaw. It's used by SME to quickly build inhouse apps)
Lima can do a lot of what shuru does if you set it up for it. the difference is mostly in defaults and how much you have to configure upfront. with shuru you get ephemeral VMs, no networking, and a clean rootfs on every run without touching a config file. shuru run and you're in. Checkpoints and branching are built into the CLI rather than being an experimental feature you have to figure out.
Lima is a much bigger and more mature project though. Shuru is something I am building partly to learn and partly because I wanted something with saner defaults for this specific use case.
Thanks for doing this. I had basically the same experience with Lima. It is very nice but the defaults are not what I want, and I don't like having to wonder whether I turned off the stuff that I don't want enabled. Better that everything is disabled by default and I selectively turn things on (like networking) as I need them.
I'm gonna give shuru a try. My main concern is being based on Alpine (seemingly the only option?) I may not be able to easily pull in the dependencies for the projects I'm working on, but I'll see how it goes.
glad to hear it, that's exactly the thinking behind it. alpine is the only option right now yeah. what kind of dependencies are you running into issues with? would help me figure out what to prioritize next.
I haven't yet - just generally I have found it a bit of a hassle to figure out which packages to install whenever I use a different distro. I'll let you know how it goes!
I would want the equivalent of the trixie-slim Docker image (Debian 13, no documentation). It's ~46 Mb instead of ~4Mb as a Docker image, but gives a reasonably familiar interface.
(This is largely based on some odd experiences with Elixir on Alpine, which is where I am doing most of my work these days.)
man this is cool. this is what i want since i read about fly.io's sprites.
slightly related to this, and i'm not familiar with linux sandboxing/containerization in depth, but any similar turn key solution for linux desktop/server? ideally i have something like sprites/shuru but on my own linux/ubuntu server instead of in the cloud.
We built SlicerVM for this in 2022, but not just for sandboxing. It's for servers + API launched VMs (i.e. what we now like to call a 'sandbox'). Feel free to take a look, a lot of our early users are saying things like this.
I've noticed claude forks parallel agents on an assigned task. How would they communicate in isolated sandboxes like these?
Would it be cleaner and more effective for a harness to orchestrate swarms of agents in a single clean linux environment like OrbStack?
haven't thought about multi-agent communication yet. each sandbox is fully isolated which is the point. checkpoints help a bit here though, you can branch multiple agents from the same checkpoint so they all start from the same state.
I think I made a cursory and incorrect assumption. Given this is backed by Apple's Virtualization, it has POSIX compliance and forks/execs are allowed within the sandbox which can support agent parallelization within a sandbox I believe.
What would you say are a natural use case for Shuru or Lima vs say a full docker like environment? What does the sandbox allow you to do differently? There's additional overhead of the hypervisor. I'm mostly just trying to learn, as yourself.
installing new tools inside container requires you to update the Dockerfile and rebuild, here it seems you can simply run the installation command and create a checkpoint
You can do this with Docker too without Dockerfile or rebuilding. You can treat the container as mutable and just start/stop it, doing changes manually, and make snapshots with docker commit.
You'll forfeit the benefits of reproducible scripted environment of course but Docker does let you do it.
Yes but they also use a custom linux kernel to achieve better performance than plain vz. I'm not technical enough to tell if it's bs, but it boots subsecond
OrbStack is great but it is solving a different problem. it's a full Docker Desktop replacement. shuru is just a thin layer over Virtualization.framework for spinning up throwaway sandboxes.
OrbStack has some invasive elements inside it trying to provide filesystem integration, and the filesystem they use is not POSIX compliant and causes breakage with some build systems and other software.
reply