> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# archal clone

> Start, stop, and inspect hosted clone sessions from the Archal CLI. Preload seeds, list MCP tools, and reuse long-lived clones across agent runs.

## Usage

```bash theme={null}
archal clone <subcommand>
```

Run `archal clone` with no subcommand to see the clone catalog.

## Subcommands

### tools

List the MCP tools a clone exposes without starting a session.

```bash theme={null}
archal clone tools github
archal clone tools github --json
```

### start

Start a hosted clone session that stays alive between runs.

```bash theme={null}
archal clone start github jira
archal clone start --all
```

| Option               | Description                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------- |
| `--all`              | Start all available clones                                                                  |
| `--seed <seeds...>`  | Preload named seeds (e.g. `--seed github:enterprise-repo stripe:small-business`). Variadic. |
| `--seed-file <path>` | Load a JSON or SQL seed file into the first clone after startup                             |
| `--name <name>`      | Custom session name shown on the dashboard                                                  |
| `--ttl-seconds <n>`  | Request a longer session lifetime (capped server-side)                                      |
| `--fresh`            | Always create a new session, even if a recent one matches                                   |

Clone sessions stay alive for 30 minutes of inactivity. Use `archal clone renew` to extend.

### status

Show the active session, health, and API base URLs.

```bash theme={null}
archal clone status
archal clone status --json
```

### list

List active hosted clone sessions for the current user.

```bash theme={null}
archal clone list
archal clone list --json
```

### renew

Extend the active session lifetime. Defaults to 1 hour if no duration is given.

```bash theme={null}
archal clone renew
archal clone renew 7200
```

### seed

Load state into a running clone.

```bash theme={null}
archal clone seed github enterprise-repo          # named seed
archal clone seed github --file seed.json         # JSON seed file
archal clone seed supabase --file seed.sql        # SQL seed file
```

### reset

Reset one or all clones to their session-start state: seeded clones snap back
to their seed baseline, unseeded clones return to empty.

```bash theme={null}
archal clone reset github                # reset one clone
archal clone reset                       # reset all clones in the session
archal clone reset --session <id>        # reset a session started elsewhere
```

`--session` looks the session up remotely, so it also works for sessions
started from the dashboard (find the id with `archal clone list`).

### stop

Tear down the active session and print usage stats.

```bash theme={null}
archal clone stop
```

## Using the returned URLs

`archal clone start` prints API base URLs you can use directly in your code:

```ts theme={null}
import { Octokit } from '@octokit/rest';

const github = new Octokit({
  baseUrl: 'https://<session>.clones.archal.ai/github/api',
  auth: process.env.GITHUB_TOKEN ?? 'ghp_test_token_for_clone',
  request: {
    hook: (request, options) =>
      request({
        ...options,
        headers: {
          ...options.headers,
          'x-route-authorization': `Bearer ${process.env.ARCHAL_TOKEN}`,
        },
      }),
  },
});
```

```python theme={null}
import stripe

stripe.api_key = "sk_live_51Abc123DefGhiJklMnoPqrStUvWxYz0123456789"
stripe.api_base = "https://<session>.clones.archal.ai/stripe/api"
```

If you call clone endpoints from `curl`, a Lambda, or a worker instead of the
Archal CLI, use the dual-header pattern in [Direct API access](/guides/direct-api-access).
SDK clients that call the printed clone URLs also need the route-control header
shown in the `archal clone start` output.
