Go to file
2026-02-16 20:22:44 -08:00
src updates 2026-02-16 20:22:44 -08:00
.gitignore Add sandlot CLI for branch-based dev with worktrees and Apple containers 2026-02-16 20:15:29 -08:00
.gitkeep Initial commit 2026-02-16 19:23:56 -08:00
bun.lock Add sandlot CLI for branch-based dev with worktrees and Apple containers 2026-02-16 20:15:29 -08:00
package.json updates 2026-02-16 20:22:44 -08:00
README.md Add sandlot CLI for branch-based dev with worktrees and Apple containers 2026-02-16 20:15:29 -08:00
SPEC.md Add sandlot CLI for branch-based dev with worktrees and Apple containers 2026-02-16 20:15:29 -08:00
tsconfig.json Add sandlot CLI for branch-based dev with worktrees and Apple containers 2026-02-16 20:15:29 -08:00

sandlot

A CLI for branch-based development using git worktrees and Apple containers. Each branch gets its own worktree and isolated VM. Commits are auto-summarized by Claude. Merging cleans everything up.

Prerequisites

  • macOS on Apple Silicon
  • Bun
  • container installed and on PATH
  • Git

Install

git clone https://github.com/your/sandlot
cd sandlot
bun install
bun link

Configure

Set your Anthropic API key:

export ANTHROPIC_API_KEY=sk-ant-...

Optionally add a sandlot.json to your repo root:

{
  "vm": {
    "cpus": 4,
    "memory": "8GB",
    "image": "ubuntu:24.04",
    "mounts": { "/path/to/deps": "/deps" }
  },
  "ai": {
    "model": "claude-sonnet-4-20250514"
  }
}

Usage

Start a session

sandlot new fix-POST

Creates a worktree at .sandlot/fix-POST/, boots a VM mapped to it, and drops you into a shell.

Save your work

sandlot save                          # AI-generated commit message
sandlot save "wip: rough validation"  # manual message

Stages all changes, commits, and pushes to origin.

Merge and tear down

sandlot push main

Merges the session branch into the target, pushes, then tears down the VM, worktree, and branch. If there are merge conflicts, Claude resolves them and asks for confirmation.

Other commands

sandlot list           # show all sessions
sandlot open <branch>  # re-enter a session's VM
sandlot stop <branch>  # stop a VM without destroying it
sandlot rm <branch>    # tear down without merging