Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{
"name": "createos",
"description": "NodeOps CreateOS plugins — disposable sandbox compute for Claude Code, Codex, and more.",
"owner": { "name": "NodeOps", "url": "https://createos.sh" },
"owner": {
"name": "NodeOps",
"url": "https://createos.sh"
},
"plugins": [
{
"name": "createos-sandbox",
"source": "./packages/claude-code-plugin",
"description": "Run ad-hoc/heavy/untrusted code in disposable CreateOS Sandboxes; offload, parallel fanout, scratch shell, reusable box with sync, port tunnel, public expose, network clusters, S3 disks, WireGuard VPN, fork, pause/resume, and custom images."
},
{
"name": "@createos/codex",
"name": "createos-sandbox-codex",
"source": "./packages/codex-plugin",
"description": "Codex plugin for disposable CreateOS Sandboxes — skill + createos CLI for sandbox lifecycle, networking, disks, and VPN."
"description": "Codex plugin for disposable CreateOS Sandboxes — the `cos` driver, the using-createos-sandbox skill, and session-start / offload-hint hooks. Same engine as the Claude Code plugin."
}
]
}
10 changes: 10 additions & 0 deletions .github/workflows/shared-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: shared files

on: [push, pull_request]

jobs:
drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: scripts/sync-shared.sh --check
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ claim aligned with `fc`. This repo is one of five in the product mesh.
| **fc-sdk** | `../fc-sdk` | TypeScript SDK **+ `examples/`** | 🌐 public | public SDK methods, wire types, example apps |
| **createos-cli** | `../createos-cli` | Go CLI | 🌐 public | commands, flags, help/UX text |
| **website-04** | `../website-04` (`content/docs/Sandbox`) | public docs | 🌐 public | REST / SDK / CLI reference + concept pages |
| **createos** | `../createos-claude-plugins` | Plugin marketplace; Claude Code, Pi, OpenCode integrations over the `createos` CLI | 🌐 public | skills, slash commands, hooks, tools |
| **createos** | `../createos-plugin` | Plugin marketplace; Claude Code, Pi, OpenCode integrations over the `createos` CLI | 🌐 public | skills, slash commands, hooks, tools |

### What counts as a shared surface

Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Heavy builds, flaky test suites, and untrusted code don't belong on your laptop.

```bash
# 1. Add the marketplace + install the plugin
/plugin marketplace add NodeOps-app/createos-claude-plugins
/plugin marketplace add NodeOps-app/createos-plugin
/plugin install createos-sandbox@createos

# 2. Offload a heavy test run to a throwaway box (auto-destroys)
Expand All @@ -46,7 +46,7 @@ Heavy builds, flaky test suites, and untrusted code don't belong on your laptop.

```bash
# 1. Install the extension from this repository
pi install git:github.com/NodeOps-app/createos-claude-plugins
pi install git:github.com/NodeOps-app/createos-plugin

# 2. Start Pi locally with CreateOS sandbox tools available
pi
Expand All @@ -65,10 +65,10 @@ pi --inside-createos-sandbox --createos-watch

```bash
# 1. Add the marketplace
codex plugin marketplace add NodeOps-app/createos-claude-plugins
codex plugin marketplace add NodeOps-app/createos-plugin

# 2. Install the plugin
codex plugin add @createos/codex@createos
codex plugin add createos-sandbox-codex --marketplace createos

# 3. Launch codex — the skill teaches createos CLI usage
codex
Expand All @@ -88,7 +88,7 @@ opencode

```bash
# 1. Install the bundle from this monorepo checkout
dsh plugin --profile web add /path/to/createos-claude-plugins/packages/dsh-createos
dsh plugin --profile web add /path/to/createos-plugin/packages/dsh-createos

# 2. Configure CreateOS sandbox credentials
export CREATEOS_SANDBOX_API_KEY='...'
Expand All @@ -106,7 +106,7 @@ The Claude Code, Codex, Pi, and OpenCode integrations use the `createos` CLI, wh
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**claude-code-plugin**](./packages/claude-code-plugin) | Hooks-based Claude Code plugin — offload, parallel fanout, scratch shell, reusable box with sync, port tunnel, public HTTPS expose, private-network clusters, BYO-S3 disk mounts, WireGuard VPN, and snapshot/fork — all driving the authed `createos` CLI. |
| [**pi-extension**](./packages/pi-extension) | Pi coding agent extension with all 33 `sandbox_*` tools for lifecycle, configuration, port tunnels, file sync, private networks, persistent disks, and device VPN. Built-in tools route remotely only with `--inside-createos-sandbox`. |
| [**@createos/codex**](./packages/codex-plugin) | Codex plugin — skill that teaches the `createos` CLI for sandbox lifecycle, networking, disks, and VPN. |
| [**createos-sandbox-codex**](./packages/codex-plugin) | Codex plugin — the `cos` driver, the `using-createos-sandbox` skill, and session-start / offload-hint hooks. Same engine as the Claude Code plugin. |
| [**@createos/opencode**](./packages/opencode-plugin) | OpenCode plugin with 33 sandbox tools (`sandbox_exec`, `sandbox_push`, `sandbox_pull`, networks, disks, VPN, sync) and system prompt injection for sandbox-first workflows. |
| [**@nodeops-createos/dsh-createos**](./packages/dsh-createos) | DeepSeek Harness bundle that replaces `ctx.fs` and `ctx.subprocess` together, so Bash, file, LSP, and PTY consumers operate inside one CreateOS sandbox without provider-specific tool forks. |
| [**createos.sandbox**](./packages/herdr-plugin) | Herdr plugin that runs Claude Code, Codex, OpenCode, Pi, or Cursor **inside** a CreateOS Sandbox and attaches its PTY to a Herdr pane. One pane maps to one sandbox, with filtered upload, two-way sync, patch apply back, and Herdr agent detection. |
Expand Down Expand Up @@ -225,28 +225,28 @@ Full reference in [dsh-createos/README.md](./packages/dsh-createos/README.md).
**From GitHub (recommended):**

```
/plugin marketplace add NodeOps-app/createos-claude-plugins
/plugin marketplace add NodeOps-app/createos-plugin
/plugin install createos-sandbox@createos
```

**From a local checkout:**

```
git clone https://github.com/NodeOps-app/createos-claude-plugins
/plugin marketplace add /path/to/createos-claude-plugins
git clone https://github.com/NodeOps-app/createos-plugin
/plugin marketplace add /path/to/createos-plugin
/plugin install createos-sandbox@createos
```

**DeepSeek Harness from a local checkout:**

```bash
dsh plugin --profile web add /path/to/createos-claude-plugins/packages/dsh-createos
dsh plugin --profile web add /path/to/createos-plugin/packages/dsh-createos
```

**Dev (instant, no install):**

```bash
claude --plugin-dir /path/to/createos-claude-plugins/packages/claude-code-plugin
claude --plugin-dir /path/to/createos-plugin/packages/claude-code-plugin
/reload-plugins # after editing plugin files
```

Expand All @@ -267,7 +267,7 @@ claude --plugin-dir /path/to/createos-claude-plugins/packages/claude-code-plugin
## Repository layout

```
createos-claude-plugins/ # marketplace root
createos-plugin/ # marketplace root
├─ .claude-plugin/
│ └─ marketplace.json # marketplace manifest
├─ packages/
Expand Down
6 changes: 3 additions & 3 deletions packages/claude-code-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ A reusable per-repo box + one-way file sync (default; `-2` for two-way). A dev s
**From the marketplace (recommended):**

```
/plugin marketplace add NodeOps-app/createos-claude-plugins
/plugin marketplace add NodeOps-app/createos-plugin
/plugin install createos-sandbox@createos
```

**Dev (instant, no install):**

```bash
claude --plugin-dir /path/to/createos-claude-plugins/packages/claude-code-plugin
claude --plugin-dir /path/to/createos-plugin/packages/claude-code-plugin
/reload-plugins # after editing plugin files
```

Expand All @@ -105,7 +105,7 @@ claude --plugin-dir /path/to/createos-claude-plugins/packages/claude-code-plugin
`cos` is **not on `PATH`** by default. To use bare `cos` in your own terminal, run its installer once by absolute path:

```bash
/path/to/createos-claude-plugins/packages/claude-code-plugin/scripts/cos install # symlinks to ~/.local/bin/cos
/path/to/createos-plugin/packages/claude-code-plugin/scripts/cos install # symlinks to ~/.local/bin/cos
```

`${CLAUDE_PLUGIN_ROOT}` only expands inside slash-command frontmatter — it is **not** set in your shell, nor in Claude's Bash tool environment. Slash commands resolve the path for you; for autonomous skill use the `SessionStart` hook publishes it. Running `cos install` once removes the question entirely.
Expand Down
7 changes: 5 additions & 2 deletions packages/claude-code-plugin/scripts/offload-hint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ set -euo pipefail
command -v jq >/dev/null 2>&1 || exit 0

input=$(cat)
cmd=$(printf '%s' "$input" | jq -r '.tool_input.command // empty' 2>/dev/null || true)
# Claude Code sends the command as a string; Codex sends an argv array
# ("shell"/"local_shell"/"exec_command"). Flatten both to one string so this
# script works unmodified in either harness.
cmd=$(printf '%s' "$input" | jq -r '(.tool_input.command // empty) | if type=="array" then join(" ") else . end' 2>/dev/null || true)
[ -n "$cmd" ] || exit 0

# never nudge for sandbox/control/VCS commands themselves
Expand All @@ -18,7 +21,7 @@ esac
# heavy build/test signatures worth isolating off-machine
if printf '%s' "$cmd" | grep -Eq \
'(^|[;&|[:space:]])(make|mvn|gradle|gradlew|bazel|tox|cmake|ctest)([[:space:]]|$)|npm[[:space:]](ci|install|run[[:space:]]build|test)|pnpm[[:space:]](i|install|run|test)|yarn[[:space:]](install|build|test)|pip[[:space:]]install|pytest|go[[:space:]]test|cargo[[:space:]](build|test)'; then
msg='[createos-sandbox] Heavy build/test detected. Consider offloading to a throwaway sandbox to keep the laptop free and isolate deps: /createos-sandbox:offload . "<cmd>" (or scripts/cos offload). Proceed locally if it needs local state/secrets. Silence: COS_NO_HINT=1.'
msg='[createos-sandbox] Heavy build/test detected. Consider offloading to a throwaway sandbox to keep the laptop free and isolate deps: `cos offload . "<cmd>"` (in Claude Code: /createos-sandbox:offload). Proceed locally if it needs local state/secrets. Silence: COS_NO_HINT=1.'
jq -nc --arg m "$msg" '{hookSpecificOutput:{hookEventName:"PreToolUse",additionalContext:$m}}'
fi
exit 0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: using-createos-sandbox
description: Use when you need to run code OFF the user's machine — heavy/long builds or test suites, untrusted or unknown code, a parallel test/config matrix across many boxes, an instant clean Linux to try a tool, a live dev-server/watcher Claude edits against, reaching a box-side service from localhost (port tunnel) or sharing it on the public web (HTTPS preview URL), a multi-machine cluster on one private network, a WireGuard VPN into that network, mounting an S3 bucket of data, or work that needs a real screen — a graphical Linux desktop with a browser that you drive by screenshot/click/type and the user can watch over noVNC. Offloads to ephemeral CreateOS Sandboxes via the `cos` helper (stage → exec → pull → auto-destroy), plus fanout, a scratch shell, and an opt-in reusable box with sync, tunnel, expose, desktop/computer-use, cluster, disk, vpn, pause/resume, custom images, and snapshot/fork.
description: Use when you need to run code OFF the user's machine — heavy/long builds or test suites, untrusted or unknown code, a parallel test/config matrix across many boxes, an instant clean Linux to try a tool, a live dev-server/watcher you edit against, reaching a box-side service from localhost (port tunnel) or sharing it on the public web (HTTPS preview URL), a multi-machine cluster on one private network, a WireGuard VPN into that network, mounting an S3 bucket of data, or work that needs a real screen — a graphical Linux desktop with a browser that you drive by screenshot/click/type and the user can watch over noVNC. Offloads to ephemeral CreateOS Sandboxes via the `cos` helper (stage → exec → pull → auto-destroy), plus fanout, a scratch shell, and an opt-in reusable box with sync, tunnel, expose, desktop/computer-use, cluster, disk, vpn, pause/resume, custom images, and snapshot/fork.
---

# Using CreateOS Sandbox as remote compute
Expand All @@ -9,9 +9,9 @@ A CreateOS Sandbox is an isolated Linux box that goes from create to running you

## Running the driver

Everything goes through `cos`. **A SessionStart hook prints its absolute path into your context at the start of the session — use that literal path.**
Everything goes through `cos`. **A session-start hook prints its absolute path into your context at the start of the session — use that literal path.**

Do not write `${CLAUDE_PLUGIN_ROOT}` into a Bash command. That variable is set when slash commands are loaded but is **unset in the Bash tool's environment**, so the path collapses to `/scripts/cos` and dies with exit 127.
In Claude Code specifically, do not write `${CLAUDE_PLUGIN_ROOT}` into a Bash command. That variable is set when slash commands are loaded but is **unset in the Bash tool's environment**, so the path collapses to `/scripts/cos` and dies with exit 127.

If you cannot locate or run `cos`, **stop and say so.** Do not fall back to composing the job out of raw `createos sandbox create/push/exec` calls. That path looks equivalent and is not: it silently drops egress restriction, the keepalive that survives a dropped stream on a long build, guaranteed auto-destroy, and the auth preflight — so a "successful" run can leave an unrestricted box billing with no isolation ever applied. A missing driver is a hard stop, not a reason to improvise.

Expand All @@ -28,7 +28,7 @@ Healthy output names one of three credential sources: `CREATEOS_API_KEY`, a brow
**You cannot fix that yourself.** `createos login` is an interactive TTY prompt that opens a browser, and an agent shell has no TTY. Do not try to run it and do not work around it with `--token`. Relay the two options to the user:

1. **Browser (recommended)** — they run `createos login` in their own terminal and pick "Sign in with browser".
2. **API key** — they `export CREATEOS_API_KEY=<key>` (from <https://createos.sh>) in the shell that launched Claude Code.
2. **API key** — they `export CREATEOS_API_KEY=<key>` (from <https://createos.sh>) in the shell that launched the agent.

**Never ask the user to paste an API key into the conversation** — it lands in the transcript. Export or browser, nothing else.

Expand All @@ -43,7 +43,7 @@ Every `cos` command except `install` and `auth` runs this check first, so an una
| **Parallel/matrix work** — same job across N configs, test shards, batch | `fanout` — each command in its own throwaway box, concurrently, results collected. |
| **Quick scratch Linux** — try a CLI/tool/snippet on a clean box | `shell` — instant keyless box, destroyed on exit (interactive; the user runs it). |
| **Clean-room repro** — "works on my machine" bugs, dependency conflicts | Fresh rootfs every time, no host state. |
| **Live dev loop** — dev server / test watcher / REPL that reacts to edits | Project box + `sync`; Claude edits locally, the box reacts. |
| **Live dev loop** — dev server / test watcher / REPL that reacts to edits | Project box + `sync`; you edit locally, the box reacts. |
| **Reach a box-side service** — dev server, DB, API | `tunnel` (private, to `127.0.0.1`) or `expose` (public HTTPS link to share). |
| **Needs a screen** — a real browser, a GUI app, or a desktop to click through | `desktop` — graphical box + noVNC URL; `computer` to drive it (screenshot/click/type). |
| **Multi-machine** — distributed system, DB replication, p2p mesh, load test | `cluster up N` — boxes share one private net, reach each other by name. |
Expand Down Expand Up @@ -106,7 +106,7 @@ Each job gets its own box with no shared network — that is what distinguishes

## Pattern B — reusable project box (opt-in)

For repeated runs against a warm box, or a dev server Claude edits against. One box per git root, tracked in a statefile.
For repeated runs against a warm box, or a dev server you edit against. One box per git root, tracked in a statefile.

```bash
cos up -s s-2vcpu-2gb # create/reuse this project's box
Expand Down
17 changes: 0 additions & 17 deletions packages/codex-plugin/.claude-plugin/plugin.json

This file was deleted.

27 changes: 27 additions & 0 deletions packages/codex-plugin/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "createos-sandbox-codex",
"displayName": "CreateOS Sandbox",
"version": "0.2.0",
"description": "Run ad-hoc, heavy, or untrusted code OFF your machine in disposable CreateOS Sandboxes via the `cos` driver — offload, fanout, scratch shell, reusable box with sync, tunnel, expose, clusters, S3 disks, VPN, pause/resume, custom images, and a graphical desktop you drive by screenshot/click/type.",
"author": {
"name": "NodeOps",
"url": "https://createos.sh"
},
"homepage": "https://createos.sh",
"keywords": [
"sandbox",
"createos",
"remote-exec",
"isolation",
"desktop",
"computer-use"
],
"skills": "./skills/",
"interface": {
"displayName": "CreateOS Sandbox",
"shortDescription": "Offload code to disposable remote sandboxes",
"developerName": "NodeOps",
"category": "Developer Tools",
"websiteURL": "https://createos.sh"
}
}
Loading
Loading