Repolode
jingkaihe

jingkaihe/matchlock

A Linux-based CLI that runs AI agents in ephemeral microVMs with network allowlisting and host-side secret injection.

Stars
647
Forks
37
Open issues
3
Last commit
20 days ago

What is it?

Matchlock is a command-line tool for running AI agents inside disposable microVMs. Each sandbox is a full Linux environment that boots in under a second, so an agent can install packages and write files without touching the host machine. The VM is discarded when the run ends, and volume overlay mounts are isolated snapshots that disappear afterward.

Network access is restricted by default once you pass --allow-host or --secret: only explicitly listed hosts are reachable. Secrets are injected by a TLS MITM proxy on the host, so the sandbox only sees a placeholder value and the real credential never enters the VM. The project also supports long-lived sandboxes with port forwarding, building images from Dockerfiles via BuildKit inside the VM, and Go, Python, and TypeScript SDKs.

It runs on Linux with KVM and on macOS with Apple Silicon, using the same CLI on both. The project is marked experimental and may have breaking changes.

Key features

  • 01Runs agents in ephemeral microVMs that boot in under a second.
  • 02Allowlists network access so only listed hosts are reachable.
  • 03Injects API keys through a host-side TLS MITM proxy so secrets never enter the VM.
  • 04Supports long-lived sandboxes with exec, attach, and port forwarding.
  • 05Builds images from Dockerfiles using BuildKit inside the VM.
  • 06Provides Go, Python, and TypeScript SDKs.

Use cases

  • Letting an AI coding agent run arbitrary code without exposing the host machine.
  • Calling third-party LLM APIs from agent code without placing keys inside the sandbox.
  • Running untrusted scripts in a disposable Linux environment with restricted egress.
  • Embedding isolated code execution into an application through the SDKs.

Quick start

  1. 1

    Tap the Homebrew repository

    brew tap jingkaihe/essentials
  2. 2

    Install matchlock with Homebrew

    brew install matchlock
  3. 3

    Run a test command in an ephemeral microVM

    matchlock run --image alpine:latest cat /etc/os-release

Things to know

  • The project is experimental and subject to breaking changes.
  • It only supports Linux with KVM and macOS on Apple Silicon.
  • On Linux, host setup may require running sudo matchlock setup linux.

In collections

Topics

FAQ

What is matchlock?
A Linux-based CLI that runs AI agents in ephemeral microVMs with network allowlisting and host-side secret injection. Matchlock is a command-line tool for running AI agents inside disposable microVMs. Each sandbox is a full Linux environment that boots in under a second, so an agent can install packages and write files without touching the host machine. The VM is discarded when the run ends, and volume overlay mounts are isolated snapshots that disappear afterward.
Is matchlock free to use? What license does it have?
matchlock is open source under the MIT license. Check the license terms before using it in commercial products.
Is matchlock still maintained?
Actively maintained. The last commit to matchlock was on Oct 4, 2026.
What can I use matchlock for?
Letting an AI coding agent run arbitrary code without exposing the host machine. Calling third-party LLM APIs from agent code without placing keys inside the sandbox. Running untrusted scripts in a disposable Linux environment with restricted egress. Embedding isolated code execution into an application through the SDKs.
How do I install matchlock?
Tap the Homebrew repository: brew tap jingkaihe/essentials Install matchlock with Homebrew: brew install matchlock Run a test command in an ephemeral microVM: matchlock run --image alpine:latest cat /etc/os-release
Where can I get matchlock?
The source code and installation instructions are on GitHub: https://github.com/jingkaihe/matchlock

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects