by baseguard
Run AI coding agents in a macOS, Linux or Windows virtual machine on your Mac.
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
# Add to your Claude Code skills
git clone https://github.com/baseguard/hangarGuides for using ai agents skills like hangar.
See how hangar compares with popular alternatives.
Claude Code, Codex and other coding agents work fastest when you turn off approvals, so they don't stop to ask before every command. But then they can do anything on your computer. Hangar runs the agent in its own virtual machine instead:
The VM can be macOS, Linux or Windows. Hangar is a Mac app and a command line (hangar) that work on the same VMs.
| Agent on your Mac, approvals off | Agent in a Hangar VM, approvals off | |
|---|---|---|
| Your files | It can read and change all of them | It sees only the folder you share |
| Your SSH keys, cloud keys, browser | Within reach | Not in the VM |
| Internet | It can connect anywhere | Only the sites you allow |
| Your API tokens | Sitting in files and environment variables | Added outside the VM, only for the sites you choose |
| If it deletes or breaks something | It's gone | Restore the snapshot |
Download the app from Releases, or install it with Homebrew:
brew install --cask baseguard/tap/hangar
To use the hangar command, open Hangar and choose Settings › Command Line › Install….
# 1. Create a Debian VM and start it in the background
hangar create kestrel --os linux --image debian
hangar run kestrel --background
# 2. Open a shell in the VM and install Claude Code
hangar exec -it kestrel bash
# curl -fsSL https://claude.ai/install.sh | bash
# 3. Allow only Anthropic and GitHub. Everything else is blocked.
hangar policy kestrel --mode allowlist --allow anthropic.com --allow claude.ai --allow github.com
# 4. Save the VM's current state, so you can go back to it later
hangar snapshot take kestrel clean
# 5. In the VM, run: claude --dangerously-skip-permissions
# On your Mac, watch every connection it makes:
hangar traffic kestrel --follow
# 6. Something went wrong? Put the VM back the way it was:
hangar stop kestrel
hangar snapshot restore kestrel clean
Prefer the app? Press ⌘N, pick macOS or Linux, and click Create and Start.
[!TIP] The full guide, with a checklist for agents you don't trust, is in Running AI agents.
Hangar records every website the VM looks up and connects to, how much data went each way, and what was blocked. It does this from your Mac, outside the VM, so nothing running inside the VM can hide its connections or turn the recording off.
The same list in the terminal:
$ hangar traffic kestrel --follow
02:39:41 allow tcp github.com 140.82.121.3:443 ↑2 KB ↓570 KB
02:39:42 BLOCK dns example.com A example.com is not allowed
02:39:43 BLOCK udp 1.1.1.1 1.1.1.1:443 QUIC is blocked
Turn on an allow list, and the VM can reach only those sites. Changes apply immediately, even while the agent is working. Blocked connections are marked in red.
To cut the VM off from the internet at once:
hangar policy kestrel --isolate on
Store a key in Hangar and it stays in your Mac's Keychain. Inside the VM, the environment variable holds a fake value. When the VM sends a request to a site you chose, Hangar replaces the fake value with the real key on the way out.
Or from the command line:
gh auth token | hangar secret set kestrel GITHUB_TOKEN --host api.github.com --value-stdin
sequenceDiagram
participant VM as Agent in the VM
participant H as Hangar, on your Mac
participant GH as api.github.com
Note over VM: GITHUB_TOKEN=hangar… (fake value)
VM->>H: Authorization: Bearer hangar…
Note over H: Gets the real key from your Keychain
H->>GH: Authorization: Bearer <the real key>
GH-->>H: 200 OK
H-->>VM: 200 OK
If the fake value is sent to any other site, it stays fake. How secrets work
A snapshot saves the VM's disk as it is right now. Taking one is instant. Restoring it throws away every change made since.
hangar snapshot take kestrel clean
hangar snapshot restore kestrel clean
Make copies of a VM from a snapshot. Each copy is a separate VM with its own network address.
hangar clone kestrel kestrel-2 --snapshot clean
hangar clone kestrel kestrel-3 --snapshot clean
hangar mcp is an MCP server. Add it to Claude Code or Codex on your Mac:
claude mcp add hangar -- hangar mcp
codex mcp add hangar -- hangar mcp
Then ask: "Create a Debian VM with Go installed that can only connect to github.com." The agent can create and start VMs, run commands in them, copy files, take snapshots and change which sites a VM can reach. It can't delete VMs, and it never sees your keys or passwords.
| VM | How to get it |
|---|---|
| macOS | Ready-made images (plain, with Homebrew, or with Xcode), or any macOS version from Apple |
| Linux | Ready-made Debian and Ubuntu images, any installer ISO, or your own image |
| Windows 11 | Microsoft's ISO for Arm. Hangar installs it without you clicking through the setup |
| Command | What it does |
|---|---|
hangar exec kestrel uname -a |
Run a command in the VM, without SSH |
hangar cp report.pdf kestrel:/home/admin/ |
Copy files into or out of the VM |
hangar share add kestrel ~/Code/app --read-only |
Share one folder from your Mac with the VM |
hangar export kestrel ghcr.io/acme/dev:1.0 |
Upload a VM to a container registry, so your team can download the same VM |
hangar template save kestrel dev.hangarvm |
Save a VM's settings to a file, to create the same VM again |
In the app:
The clipboard can be shared with the VM too. It's off by default.
| Hangar | Tart | Docker Sandboxes | NVIDIA OpenShell | |
|---|---|---|---|---|
| Runs the agent in | A full VM | A full VM | A small VM (microVM) | A restricted process (Landlock, seccomp) |
| Operating systems | macOS, Linux, Windows 11 | macOS, Linux | Linux | Linux |
| Mac app | Yes, and a command line | Command line only | Command line only | Command line only |
| Allow only some websites | Yes, changes apply immediately | By IP range only, set when the VM starts | Yes, changes apply immediately | Yes, changes apply immediately |
| Log of every connection | Yes, recorded outside the VM | No | Allowed and blocked sites | Connections and HTTP requests |
| API keys added outside the VM | Yes | No | Yes | Yes |
Checked in November 2026. Sources for every row: hangar.bot/compare.
hangar is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by baseguard. Run AI coding agents in a macOS, Linux or Windows virtual machine on your Mac. It has 58 GitHub stars.
hangar's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/baseguard/hangar" and add it to your Claude Code skills directory (see the Installation section above).
hangar is primarily written in Swift. It is open-source under baseguard on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh hangar against similar tools.
No comments yet. Be the first to share your thoughts!