open-gitagent

Gitmachine — AI skill for Claude Code

AI community

Git-aware sandboxed VM orchestration for AI agents.

How to install Gitmachine

This entry records only its repository, not the path inside it, so there is no exact command to give. Open open-gitagent/gitmachine and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Gitmachine does

Git-aware sandboxed VM orchestration for AI agents.

Alternatives in AI

  • Launch An AI Feature — Workflow recipe — take an AI/LLM feature from a probabilistic-aware PRD to a launch-ready model card by chaini 1.3k ★
  • Claudexor — Multi-harness control plane for Claude Code, Codex, Cursor, and OpenCode: quota-aware rotation across multiple 425 ★
  • Glade MCP — Connect any MCP-compatible AI client (Claude Code, Cursor, Windsurf) to Unity or Godot 201 ★

README

GitMachine

A TypeScript package for running git-aware sandboxed virtual machines. Clone a repo into an isolated VM, run commands, and auto-commit results back — with branch-based session persistence.

GitMachine is the infrastructure layer for [GitAgent](https://github.com/open-gitagent/gitagent). It handles VM lifecycle + git operations so agent orchestration layers can focus on what matters.

Install

npm install gitmachine
# or
bun add gitmachine

Quick Start

import { GitMachine, E2BMachine } from "gitmachine";

const machine = new E2BMachine({ apiKey: "e2b_..." });

const gm = new GitMachine({
  machine,
  repository: "https://github.com/user/my-agent.git",
  token: "ghp_...",
  session: "feature-work",
  autoCommit: true,
  env: { ANTHROPIC_API_KEY: "sk-..." },
  onStart: async (gm) => {
    await gm.run("npm install -g @anthropic-ai/claude-code");
  },
  onEvent: (event, data) => console.log(`[${event}]`, data),
});

await gm.start();   // VM up → repo cloned → branch checked out → onStart runs

const result = await gm.run("claude -p 'review this code' --print");
console.log(result.stdout);

await gm.pause();   // auto-commits → VM paused

// ... later ...

await gm.resume();  // VM comes back, repo state intact
await gm.run("claude -p 'continue the review' --print");

await gm.stop();    // auto-commits → pushes → VM torn down

Architecture

┌─────────────────────────────────────────┐
│              GitMachine                 │
│  git clone / commit / push / sessions   │
│  auto-commit on pause/stop              │
├─────────────────────────────────────────┤
│              Machine (ABC)              │
│  start / pause / resume / stop          │
│  execute / readFile / writeFile         │
├─────────────────────────────────────────┤
│            E2BMachine                   │
│  E2B Sandbox SDK wrapper                │
│  Full API access via getSandbox()       │
└─────────────────────────────────────────┘

**Mac