Go to file
2026-02-18 16:04:49 -08:00
src Add symlink in .sandlot/<branch> pointing to worktree on create, remove on close 2026-02-18 16:04:49 -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 updates 2026-02-17 08:52:07 -08:00
package.json simplify 2026-02-17 07:57:24 -08:00
README.md use lima 2026-02-17 08:15:03 -08:00
SPEC.md use lima 2026-02-17 08:15:03 -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 Lima VMs. Each branch gets its own worktree and isolated VM.

Prerequisites

  • macOS on Apple Silicon
  • Bun
  • Lima (brew install lima)
  • Git

Install

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

Usage

Run all commands from inside a cloned git repo.

Start a session

sandlot new fix-POST

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

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 session (VM, worktree, local branch)

Use git directly for commits, pushes, merges, etc. The worktree is a normal git checkout.

Project config

Optionally add a sandlot.json to your repo root:

{
  "vm": {
    "cpus": 4,
    "memory": "8GB",
    "image": "ubuntu:24.04",
    "mounts": { "/path/to/deps": "/deps" }
  }
}