Skip to content
seznamPublic

About

πŸ”’ Jail OpenCode, Claude Code, Copilot CLI and OmO in micro-VMs: only your project folders, only the networks you allow.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

53 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

1,062 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

jailoc

jailoc

CI Release Downloads Homebrew Cask Go Version License

Give your coding agent its own computer, not your whole host. jailoc runs OpenCode, Claude Code, GitHub Copilot CLI, OmO, pi or Antigravity CLI in a libkrun micro-VM per workspace, with only the directories you share and only the network your rules allow.

πŸ“– Full documentation

What is this?

Each workspace boots its own VM with its own kernel. Your project directories are shared into it, a network broker on the host decides every connection it makes, and the agent runs in detachable sessions you attach to over SSH. Run jailoc in a project directory and you're talking to the agent.

Why jailoc

  • πŸ“ Only the files you share: the agent sees the directories you share and read-only snapshots of files you list. Your SSH keys, browser profiles and other projects aren't in the VM.
  • 🌐 Egress by rule: destinations no allow rule matches are denied, apart from the coding agent's own endpoints. Private and reserved IPv4 and IPv6 ranges stay closed unless a rule opens them, so the agent can't wander into your internal network. With an upstream proxy, the proxy you trust enforces this for the final address.
  • 🐳 Docker stays inside: with enable_docker = true the Docker daemon runs in the workspace VM. No host socket mounting.
  • Your agent, your workflow: jailoc provides the isolated computer, not the development process. Your instructions, tools, Git workflow and ticket system stay yours. See A boundary, not a workflow.
  • ⚑ One command to start: jailoc unpacks its embedded VM runtime, builds the image, boots the VM and attaches you to the agent.

Warning

Shared directories are read-write: the agent's edits land on your host at once, including Git hooks that run the next time you use Git there; protect_git covers only the repositories it applies to. Anything the agent can read can leave through the destinations your rules allow. Security boundaries lists the exact limits, including the VMM confinement gaps on Linux and the Seatbelt deprecation risk on macOS.

Installation

Requirements: macOS on Apple Silicon, or Linux amd64 (arm64 experimental) with read-write access to /dev/kvm and Landlock (Linux 5.19 or later). Docker Engine is optional: by default jailoc builds images with it when it's running and in a builder VM otherwise. Upgrading an existing installation? See the upgrade guide.

Homebrew

On macOS with Apple Silicon (the cask works on Linux too). The binary isn't notarized by Apple, so the cask removes its quarantine attribute to keep Gatekeeper from blocking it:

brew install --cask seznam/tap/jailoc

Then run jailoc in your project directory; Getting Started walks through the first run.

Other ways to install:

  • Pre-built binaries for macOS arm64 and Linux amd64/arm64: download an archive.
  • Nix: nix run github:seznam/jailoc, or add the flake; on Linux it builds the VM runtime from source, on aarch64-darwin you provide one. See Install with Nix.
  • From source: go install …@latest can't start workspaces; build from a checkout and provide the VM runtime as in Build from source.

πŸ› οΈ Development

go generate ./internal/guestbin ./internal/brokerbin   # embed the jailoc-guest VM init and the listener broker
go build ./cmd/jailoc
go test ./...

CONTRIBUTING.md covers VM integration tests, linting and commit style; CODE_OF_CONDUCT.md sets the community guidelines.

πŸ“¦ What's in the default image

Ubuntu 26.04 with Node.js, Python 3.14, npm, four language servers (TypeScript, Pyright, YAML, Bash) and everyday CLI tools such as rg, fdfind, jq, git, gpg, ssh and curl. jailoc adds the workspace's coding agent and, with enable_docker, Docker on top. Versions are pinned in the embedded Dockerfile; the default image reference lists every tool.

Security

Report vulnerabilities privately; see SECURITY.md. The security boundaries page describes what jailoc isolates and what it doesn't.

License

jailoc is MIT-licensed. Release binaries embed a VM runtime with Apache-2.0, LGPL-2.1 and GPL-2.0 components (libkrunfw bundles a Linux kernel); see THIRD_PARTY_NOTICES in each release archive and the runtime licenses. The libkrunfw source is attached to every release as jailoc_<version>_vm-runtime-source.tar.

About

πŸ”’ Jail OpenCode, Claude Code, Copilot CLI and OmO in micro-VMs: only your project folders, only the networks you allow.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

53 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages