메뉴
HN
Hacker News 15일 전

Clawk: 코딩 AI 에이전트를 위한 일회성 리눅스 가상머신

IMP
8/10
핵심 요약

Clawk는 자율주행 코딩 AI 에이전트에게 개발자의 실제 로컬 PC 대신 격리되고 파기 가능한 일회성 리눅스 가상머신(VM) 환경을 제공하는 오픈소스 도구입니다. AI가 코드를 실행하고 패키지를 설치할 때 발생할 수 있는 보안 위협이나 시스템 파괴(rm -rf 등)로부터 호스트 PC를 완벽하게 보호할 수 있어 매우 유용합니다.

번역된 본문

코딩 에이전트에게 당신의 노트북이 아닌, 독자적인 일회성 리눅스 머신을 제공하세요.

설치 · 빠른 시작 · 왜 VM인가? · 작동 방식 · 비교 · FAQ · 문서

코딩 에이전트는 패키지를 설치하고, 작성한 코드를 실행하며, 서버를 시작하고, 네트워크를 사용하는 등 실제 작업을 수행할 수 있도록 허용해야만 진정한 유용성이 있습니다. 하지만 당신의 로컬 PC에서 이를 허용하는 것은 두 가지 좋지 않은 선택지를 남깁니다. 모든 명령어를 승인하며 몇 초마다 프롬프트 창을 지켜봐야 하거나, '--dangerously-skip-permissions'를 실행하면서 중요한 파일이 'rm -rf' 명령으로 날아가거나 토큰이 유출되지 않기를 바라는 심리적 도박을 해야 합니다.

clawk는 제3의 선택지입니다. 저장소 디렉토리로 이동해 'clawk'를 입력하면, Claude Code(또는 Codex, 쉘)가 일회성 리눅스 VM 내부에서 작동합니다. (코드가 마운트 되고, 게스트 내에서 root 권한을 가지며, 권한 프롬프트가 없습니다.) 반면 당신의 파일, 키체인, 그리고 나머지 PC 시스템은 에이전트가 닿을 수 없는 곳에 안전하게 보호됩니다. 즉, 에이전트는 당신의 PC가 아닌 자신만의 머신을 갖게 됩니다.

명령어 한 번이면 에이전트가 작동하며, 알려지지 않은 서버로의 데이터 전송 시도는 네트워크 허용 목록(allow-list)에 의해 차단됩니다. 'clawk attach' 명령어를 통해 나중에 세션을 다시 이어갈 수 있습니다. 이러한 경계선은 에이전트가 꼬득여서 무너질 수 있는 프롬프트 상의 규칙이 아닙니다. 이는 완전히 분리된 머신이며, 유일한 통로는 당신이 마운트한 항목뿐입니다.

샌드박스 내부의 쉘에서 다음과 같이 작동합니다: $ curl https://tracker.evil.example # 허용 목록에 없음: 차단됨 curl: (7) Failed to connect to tracker.evil.example port 443 after 2 ms: Connection refused

$ cat ~ /.ssh/id_rsa # 당신의 키는 VM에 결코 들어오지 않음 cat: /home/agent/.ssh/id_rsa: No such file or directory

$ git push # 하지만 이것은 작동함: ssh-agent가 포워딩됨 Enumerating objects: 5, done.

한계에 대해 솔직히 말씀드리면, 허용 목록은 알려지지 않은 서버로의 연결을 차단할 뿐 당신이 허용한 서버까지 차단하지는 않습니다. github.com은 기본적으로 허용되어 있으며, 포워딩된 ssh-agent를 통해 푸시가 가능하므로 에이전트가 읽을 수 있는 것은 무엇이든 외부로 게시될 수 있다고 간주하십시오. 이에 대해서는 보안 모델 문서에 명시되어 있습니다.

만약 에이전트가 VM을 망가뜨렸다면, 'clawk destroy && clawk'를 실행하면 됩니다. 새로운 VM과 동일한 저장소가 열리며 '--resume'이 대화 내용을 복구해 줍니다.

중요 안내 현재 1.0 버전 이전이며 빠르게 개발이 진행 중입니다. 릴리스 간에 호환성이 깨지는 변경(Breaking changes)이 있을 수 있고 종종 미세한 버그가 있을 수 있습니다. 문제가 발생하면 이슈를 제출해 주세요. 그 피드백이 1.0 버전을 만들고 있습니다.

주요 특징

  • 에이전트에게 무엇이든 하도록 허용하세요. 제한된 네트워크를 갖춘 일회성 VM에서 실행되므로, rm -rf, 패키지 설치 및 신뢰할 수 없는 코드가 당신의 호스트, 파일 또는 명시적으로 공유하지 않은 모든 것에 피해를 줄 수 없습니다.
  • 단 한 줄의 명령어로 작업 시작. 저장소로 이동하여 clawk를 실행하십시오. 별도의 Dockerfile, devcontainer 또는 설정 파일이 필요하지 않습니다. 첫 부팅 시 이미지로부터 rootfs를 빌드하며, 이후 부팅은 몇 초 밖에 걸리지 않습니다.
  • 손실 없이 망가뜨리기. 자유롭게 파괴하고 재생성할 수 있습니다. 코드와 에이전트의 대화 내용은 호스트에 그대로 보존되며, 잃어버리는 것은 일회성 VM 디스크뿐입니다.
  • 진정한 리눅스 머신, 당신만의 툴체인. 모든 OCI 이미지가 rootfs가 됩니다. 프로젝트에 필요한 도구만 정확히 갖춘 완벽한 OS입니다. Docker 데몬이 필요하지 않습니다.
  • 비밀 정보는 내 PC에 보관. 아웃바운드 트래픽은 허용 목록 방식을 사용하며 ssh-agent가 포워딩되므로, 키가 VM 내부로 들어가지 않고도 git push가 작동합니다.
  • 프로젝트 또는 티켓별 샌드박스. 여러 개를 동시에 실행할 수 있습니다. 멀티 저장소 티켓은 조정된 PR을 통해 각 저장소별로 git worktree를 가져옵니다. 유휴 상태의 VM은 자동으로 메모리를 해제하고 디스크로 일시 중단되므로, 잊혀진 샌드박스는 거의 비용을 차지하지 않습니다.

왜 VM인가? clawk는 자율주행 코딩 에이전트를 위한 범용 로컬 환경입니다. VM이 핵심입니다. 이는 에이전트가 소유할 수 있는 완전한 머신이지, 사용 중인 PC 위에서 정책으로 감싸인 단순한 프로세스가 아닙니다.

  • 독립적인 커널. 게스트는 자체 리눅스 커널을 실행하므로 호스트 파일 시스템이 거부 규칙 뒤에 숨겨져 있는 것이 아니라 아예 마운트되지 않습니다.
  • 친숙한 리눅스 환경. 표준 커널, 표준 사용자 공간, /dev/kvm 기반의 기대치를 충족하므로, 예상치 못한 시스템 콜 필터링 문제 없이 공식 문서대로 도구들이 작동합니다.
  • 게스트 내 root 권한. 시스템 패키지를 설치하고 /etc를 편집하며 모듈을 로드하고 권한이 있는 포트를 바인딩할 수 있습니다. 이는 에이전트가 마음대로 재구성할 수 있는 박스입니다.
  • 일회성 수명 주기. 망가뜨리기 저렴하고 재생성이 빠릅니다. 파괴된 VM은 'clawk destroy && clawk' 명령 하나면 해결되며, 당신의 저장소와 대화 내용은 호스트에서 전혀 손상되지 않습니다.
  • 강력한 분리.
원문 보기
원문 보기 (영어)
Give a coding agent its own disposable Linux machine, not yours. Install · Quickstart · Why a VM? · How it works · Compared to · FAQ · Docs A coding agent is only useful when you let it actually do things: install packages, run the code it writes, start servers, use the network. On your own machine that leaves two bad options. You approve every command (and babysit a prompt every few seconds), or you run --dangerously-skip-permissions and hope nothing important is one rm -rf or one leaked token away. clawk is a third option. cd into a repo, type clawk , and Claude Code (or Codex, or a shell) is working inside a disposable Linux VM (your code mounted in, root in the guest, no permission prompts) while your files, your keychain, and the rest of your machine stay out of reach. The agent gets its own machine instead of yours. One command to a working agent; an attempt to send data to an unknown server, blocked by the network allow-list; clawk attach resumes the session later. The boundary isn't a rule in a prompt the agent could be talked out of. It's a separate machine, and the only openings are the ones you mounted. From a shell inside a sandbox: $ curl https://tracker.evil.example # not on the allow-list: blocked curl: (7) Failed to connect to tracker.evil.example port 443 after 2 ms: Connection refused $ cat ~ /.ssh/id_rsa # your keys never entered the VM cat: /home/agent/.ssh/id_rsa: No such file or directory $ git push # ...yet this works: ssh-agent is forwarded Enumerating objects: 5, done. To be honest about the limits, the allow-list blocks connections to unknown servers, not to ones you've allowed: github.com is pre-allowed and the forwarded ssh-agent can push, so treat anything the agent can read as something it could publish. The security model spells this out. And if the agent wrecks the VM, run clawk destroy && clawk : a fresh VM, same repo, and --resume restores the conversation. Important Pre-1.0 and moving fast. Expect breaking changes between releases and the occasional rough edge; things can and will break. Please file issues; that feedback is shaping 1.0. Highlights Let the agent do anything. It runs in a disposable VM with a restricted network, so rm -rf , package installs, and untrusted code can't reach your host, your files, or anything you didn't explicitly share. Working in one command. cd into a repo and run clawk . No Dockerfile, devcontainer, or setup file. First boot builds a rootfs from your image; every boot after takes seconds. Break it without losing anything. Destroy and recreate freely; your code and the agent's conversations live on the host. Only the disposable VM disk is lost. A real Linux box, your toolchain. Any OCI image is the rootfs: a full OS with exactly the tools your project needs. No Docker daemon required. Secrets stay on your machine. Outbound traffic is allow-listed and your ssh-agent is forwarded, so git push works without keys entering the VM. A sandbox per project or ticket. Run several at once; multi-repo tickets get a git worktree per repo with coordinated PRs. Idle VMs automatically release memory and suspend to disk, so a forgotten sandbox costs (almost) nothing. Why a VM? clawk is a general-purpose local environment for autonomous coding agents. The VM is the point: it's a whole machine the agent can own, not a process wrapped in policy on the one you're using. A separate kernel. The guest runs its own Linux kernel, so the host filesystem isn't hidden behind deny rules; it was never mounted. A conventional Linux environment. Standard kernel, standard userland, /dev/kvm -shaped expectations, so tools behave the way their docs say, without a syscall-filter surprise. Root in the guest. Install system packages, edit /etc , load a module, bind a privileged port. It's the agent's box to reconfigure. A disposable lifecycle. Cheap to break and quick to recreate; a wrecked VM is one clawk destroy && clawk away, with your repo and conversations untouched on the host. Stronger separation from the host. Isolation rests on the hypervisor boundary rather than on getting a process-sandbox policy exactly right. That combination runs workloads a restricted process sandbox tends to fight you on: installing packages and native dependencies; running background services (databases, queues, dev servers); executing untrusted builds and tests at full speed; using system-level Linux tooling that expects a real machine; and, with a KVM-enabled guest kernel on supported hardware, container and Kubernetes dev workflows such as Docker or Kind running inside the sandbox. This is opt-in and hardware-gated; see Images for the exact requirements. None of this is the product ; clawk is for local agent work in general. Docker and Kubernetes are just the sharpest example of "needs a real machine, not a sandboxed process." Install Requires macOS 14+ on Apple silicon. (Linux is supported via firecracker and currently experimental; see VM providers for the gaps. This README is macOS-first.) brew install clawkwork/tap/clawk From source (contributors, or if you don't use Homebrew), needs Go 1.26+: git clone https://github.com/clawkwork/clawk && cd clawk make install Either way there's no extra host tooling: no Docker, no qemu, no sudo. The hypervisor is Apple's Virtualization.framework, linked into the binary. First run probes for anything missing and offers to fix it. Uninstall: clawk destroy your sandboxes, rm -rf ~/.clawk , then remove the binary with brew uninstall clawk (or delete it from $GOBIN for a source install). Nothing else was installed: there are no launchd jobs; the per-sandbox daemons are ordinary processes that exit with their VMs. Quickstart The everyday case, a sandbox for the directory you're in: cd ~ /code/my-project clawk # boot a sandbox for this dir + attach claude clawk run shell # drop into a shell in the same sandbox clawk run codex # or another agent: codex, opencode, shell clawk down # stop the VM (repo + agent state persist) clawk attach # come back later — boots if stopped, reattaches claude clawk destroy # remove the VM (conversation history is kept) Common options: clawk run claude -- --resume # pass args through to the agent clawk forward add my-project 3000 # expose a guest dev server on localhost:3000 clawk network allow my-project api.example.com Working on a ticket that spans several repositories? One command creates a sandbox with a git worktree per repo on a fresh branch, and clawk pr later opens cross-linked PRs for whatever changed: cd ~ /code/my-workspace # contains a clawk.mod listing the repos clawk work INFRA-123 # one sandbox, a worktree per repo, claude attached clawk pr INFRA-123 # push branches + open one PR per repo The full ticket lifecycle (status, follow-up branches after merges, rebases) is in docs/ticket-mode.md . Tip: using Claude Code? Run claude setup-token then clawk auth set-token once, and every sandbox comes up already signed in, with no /login and no login conflicts between parallel sandboxes. See docs/claude-auth.md . What survives what One rule governs persistence: the VM is disposable; everything you'd miss lives on the host. clawk down clawk destroy Your repo (mounted worktree; commits, branches) ✅ ✅ Agent state (Claude/Codex conversations, memory) ✅ ✅ The VM disk (apt installs, caches, $HOME ) ❌ (rebuilt fresh at every boot*) ❌ (that's the point) * Two exceptions: resuming a clawk snapshot restores the disk and memory exactly as suspended, and the Linux/firecracker provider keeps its disk until destroy. Tools every boot needs belong in the image ( vm ( image … ) ); per-boot setup belongs in on up hooks. Agent state is host-mounted per sandbox: the guest's ~/.claude/projects/ and ~/.claude/memory/ (and codex's ~/.codex/ ) live under ~/.clawk/namespaces/default/state/<name>/ on the host, so a recreated sandbox picks up its old conversations with --resume . Full autonomy by default (and the --safe opt-out) Runners launch in their "externally sandboxed" modes: claude get