Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Orchestrate sandboxed coding agents in TypeScript with sandcastle.run()
| Date | Stars |
|---|---|
| 2026-07-31 | 7115 |
| 2026-08-01 | 7147 |
| 2026-08-02 | 7147 |
| 2026-08-06 | 7147 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://res.cloudinary.com/total-typescript/image/upload/v1775033787/readme-sandcastle-ondark_2x.png">
<source media="(prefers-color-scheme: light)" srcset="https://res.cloudinary.com/total-typescript/image/upload/v1775033787/readme-sandcastle-onlight_2x.png">
<img alt="Sandcastle" src="https://res.cloudinary.com/total-typescript/image/upload/v1775033787/readme-sandcastle-onlight_2x.png" height="200" style="margin-bottom: 20px;">
</picture>
</div>
## What Is Sandcastle?
A TypeScript library for orchestrating AI coding agents in isolated sandboxes:
1. You invoke agents with a single `sandcastle.run()`.
2. Sandcastle handles sandboxing the agent with a configurable branch strategy.
3. The commits made on the branches get merged back.
Sandcastle is provider-agnostic — it ships with built-in providers for Docker, Podman, and Vercel, and you can create your own. Great for parallelizing multiple AFK agents, creating review pipelines, or even just orchestrating your own agents.
## Prerequisites
- [Git](https://git-scm.com/)
- A sandbox provider — Sandcastle needs an isolated environment to run agents in. Built-in options:
- [Docker Desktop](https://www.docker.com/) — most common for local development
- [Podman](https://podman.io/) — rootless alternative to Docker
- [Vercel](https://vercel.com/) — cloud-based Firecracker microVMs via `@vercel/sandbox`
- Or [create your own](#custom-sandbox-providers) using `createBindMountSandboxProvider` or `createIsolatedSandboxProvider`
## Quick start
1. Install the package:
```bash
npm install --save-dev @ai-hero/sandcastle
```
2. Run `npx @ai-hero/sandcastle init`. This scaffolds a `.sandcastle` directory with all the files needed.
```bash
npx @ai-hero/sandcastle init
```
3. Edit `.sandcastle/.env` and fill in your default values for `CLAUDE_CODE_OAUTH_TOKEN` (run `claude setup-token` on your host to get one). To use an Anthropic API key instead, uncomment and fill in `ANTHROPIC_API_KEY`.
```bash
cp .sandcastle/.env.example .sandcastle/.env
```
4. Run the `.sandcastle/main.ts` (or `main.mts`) file with `npx tsx`
```bash
npx tsx .sandcastle/main.ts
```
```typescript
// 3. Run the agent via the JS API
import { run, claudeCode } from "@ai-hero/sandcastle";
import { docker } from "@ai-hero/sandcastle/sandboxes/docker";
await run({
agent: claudeCode("claude-opus-4-8"),
sandbox: docker(), // or podman(), vercel(), or your own provider
promptFile: ".sandcastle/prompt.md",
});
```
## Sandbox Providers
Sandcastle uses a `SandboxProvider` to create isolated environments. The `sandbox` option on `run()`, `interactive()`, and `createSandbox()` accepts any provider, including `noSandbox()` — opt in to running the agent directly on the host when container isolation is undesired. Built-in providers:
| Provider | Import path | Type | Accepted by |
| ---------- | ------------------------------------------ | ---------- | ------------------------------------------- |
| Docker | `@ai-hero/sandcastle/sandboxes/docker` | Bind-mount | `run()`, `createSandbox()`, `interactive()` |
| Podman | `@ai-hero/sandcastle/sandboxes/podman` | Bind-mount | `run()`, `createSandbox()`, `interactive()` |
| Vercel | `@ai-hero/sandcastle/sandboxes/vercel` | Isolated | `run()`, `createSandbox()`, `interactive()` |
| No-sandbox | `@ai-hero/sandcastle/sandboxes/no-sandbox` | None | `run()`, `createSandbox()`, `interactive()` |
Worktree methods (`wt.run()`, `wt.interactive()`, `wt.createSandbox()`) accept the same providers as their top-level counterparts. `wt.interactive()` defaults to `noSandbox()` when no sandbox is specified.
```typescript
import { docker } from "@ai-hero/sandcastle/sandboxes/docker";
import { podman } from "@ai-hero/sandcastle/sandboxes/podman";
import { vercel } from "@ai-hero/sandcaExcerpt of 88,593 characters
Read on GitHubMatt Pocock · Total TypeScript
1.0k
51
4
3
Jérôme Benoit · Piment Noir · France
2
Szymon Rączka
1
Anders Bech Mellson · Energinet · Denmark
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:da3b10c43f197eef, llm:Repository description: 'Orchestrate sandboxed coding agents in TypeScript with sandcastle.run()' (TypeScript project for orchestrating coding agents).
matched fp:da3b10c43f197eef, llm:Repository description: 'Orchestrate sandboxed coding agents in TypeScript with sandcastle.run()' (TypeScript project for orchestrating coding agents).
matched fp:da3b10c43f197eef, llm:Repository description: 'Orchestrate sandboxed coding agents in TypeScript with sandcastle.run()' (TypeScript project for orchestrating coding agents).