Hangar
ActiveOpen SourceApache-2.0114 starsApache-2.0 Mac app and CLI that run coding agents in macOS, Linux or Windows VMs on Apple silicon, with host-side traffic logging, an egress allowlist, Keychain-backed secret injection and instant disk snapshots.
- Metered unit
- no vendor charge; your own Mac
- Free Tier
- Idle billing
- Zero cost while idle
- 347 listings stay free while idle
- State kept on pause
- Disk only
- Resume: Not published; a VM restored from a snapshot starts fresh from the saved disk
Overview
Hangar takes the position that approvals are what make coding agents slow, so the right move is to move the agent into a whole computer. Each VM is a real macOS, Linux or Windows 11 guest on Apple's Virtualization.framework, which means the agent can be root, use sudo and Homebrew, run servers and see only the one folder you share. The network is the interesting half. Traffic is recorded from the Mac rather than inside the guest, so nothing the agent runs can hide a connection or switch the recorder off, and allowlist mode restricts a running VM to the hosts you name with changes applied immediately. API keys are stored in the Mac Keychain and injected into request headers on the way out, so the guest only ever holds a fake value. Disk snapshots are APFS copy-on-write and instant, restoring throws away everything since the snapshot, and cloning from a snapshot gives each parallel agent its own VM with its own address. A hangar CLI mirrors the app, and hangar mcp exposes VM creation, commands, file copy, snapshots and policy changes to an agent that cannot delete VMs or read the keys. The limits are stated plainly: HTTPS filtering sees host names rather than URLs, a writable shared folder can affect the Mac, and a new VM is unconstrained until you enable an allow list.
Key capabilities
- macOS, Linux and Windows 11 VMs on Apple Virtualization.framework
- Traffic recorded outside the guest, so the agent cannot turn it off
- Allowlist, blocklist, monitor and isolate network modes applied live
- API keys kept in the Mac Keychain and injected at the egress boundary
- Instant APFS snapshots and clone-from-snapshot for parallel agents
- Shared folders, file copy, port forwarding and USB passthrough
hangarCLI and an MCP server for host-side agents- VMs and snapshots exportable to an OCI registry
- Apache-2.0 and free
hangar.sh
# Install, then give Claude Code a Debian VM that can only reach Anthropic and GitHub
brew install --cask baseguard/tap/hangar
hangar create kestrel --os linux --image debian
hangar run kestrel --background
hangar exec -it kestrel bash # install the agent inside the guest
hangar policy kestrel --mode allowlist --allow anthropic.com --allow claude.ai --allow github.com
hangar snapshot take kestrel clean
hangar traffic kestrel --follow # watch every connection from the Mac
hangar stop kestrel
hangar snapshot restore kestrel clean # undo everything since the snapshotSimilar alternatives
Technical specifications
- Runtime architecture
- Every VM runs on Apple's Virtualization.framework through VZVirtualMachine, with a separate guest kernel and disk
- Runtime notes
- Guests can be macOS, Linux (ready-made Debian and Ubuntu images, any installer ISO, or your own image) or Windows 11 Arm
- Network traffic is observed and filtered from the Mac, outside the guest, so software in the VM cannot disable it
- API keys live in the Mac Keychain and are substituted into request headers at the egress boundary
- Cold-start boot time
- Not published; images and ISOs are cached after the first download, so later VMs start faster
- Max vCPU
- 4 CPUs by default for macOS and Windows 11 guests, 2 for Linux; set with --cpu
- Max memory
- 8 GB by default for macOS and Windows 11 guests, 4 GB for Linux; set with --memory
- Storage model
- 80 GB default disk for macOS, 64 GB for Windows 11 and 20 GB for Linux, growable on a stopped VM; disks only use the space they need
- Network isolation
- Hangar watches and filters every managed VM from the Mac, outside the guest: DNS lookups, connections with their host names from DNS, TLS and HTTP, bytes in and out, and what was blocked. The default monitor mode records without blocking; allowlist mode blocks everything except the allowed hosts and their subdomains or networks, blocklist mode does the reverse, and isolate mode cuts the internet off. With an allow or block list, other VMs, services on the Mac and the local network are blocked unless explicitly allowed. For HTTPS it sees the host name, not the URL, and a site sharing an IP with an allowed site can be reachable. QUIC is blocked in those modes unless allowed, because it hides host names. A new VM blocks nothing until an allow list is turned on.
Lifecycle & capabilities
- Filesystem persistence
- Supported
- Memory / disk snapshot
- Supported
- Instant forking
- Supported
- GPU acceleration
- Not supported
- GUI desktop / VNC
- Supported
- Mobile / cloud phone
- Not supported
- Browser automation
- Not supported
- Network egress control
- Supported
- Pause / auto-sleep
- Not supported
- MCP protocol server
- Supported
- REST API & SDKs
- Not supported
- Idle billing
- Zero cost while idle
- State kept on pause
- Disk only
- Resume latency
- Not published; a VM restored from a snapshot starts fresh from the saved disk
- Session limit
- No published cap; VMs run until stopped and live in ~/.hangar until deleted
Pricing model
Official VerifiedRate read 21 Nov 2026.
Free and open source under the Apache License 2.0; the app and the `hangar` command line carry no account, licence fee or hosted tier. You supply the Apple silicon Mac, the macOS 27 host and the agent's own subscription or API key, so the only runtime cost is local.