
# Creating

## Create from the host

```bash
wp rudel create --name=alpha --theme=twentytwentyfour
```

Rudel clones the host WordPress tables into a generated sandbox prefix, copies the selected active theme into the sandbox directory, and records the sandbox in the host WordPress database.

If `--theme` is omitted, Rudel uses the host site's active theme.

## Create from another sandbox

```bash
wp rudel create --name=feature-b --clone-from=alpha-1234
```

The new sandbox receives cloned tables and managed theme files from the source sandbox.

## Lifecycle metadata

Sandboxes can carry metadata for cleanup and ownership:

```bash
wp rudel create \
  --name=feature-a \
  --owner=dennis \
  --labels=agent,qa \
  --purpose="Test checkout changes" \
  --ttl-days=7
```

Use `--protected` when automated cleanup must not remove the sandbox.

## Git-backed themes

```bash
wp rudel create \
  --name=feature-a \
  --theme=my-theme \
  --git=https://example.test/my-theme.git \
  --branch=main \
  --dir=themes/my-theme
```

Rudel can create a tracked theme worktree through its PHP-native Git integration. The worktree metadata is stored in Rudel's runtime tables.
