---
title: "Platform CLI · intentic sandbox API"
description: "Run the in-sandbox platform tool and follow its output as it arrives. Every route in the platform cli group of the intentic sandbox API, with its input, its answer and a playground."
url: "https://intentic.dev/api/intentic/"
---

Connected systems

# Platform CLI

Run the in-sandbox platform tool and follow its output as it arrives

**On this page (3 sections)**

- [Run an infrastructure command](#intentic-run)
- [Bring the infrastructure into line](#intentic-apply)
- [Follow the reconcile](#intentic-applyEvents)

Runs the sandbox's own command-line tool and streams its output line by line. The reconcile is separated out because it takes minutes: it starts a background job and answers at once, and its event stream replays from the beginning and then follows live, so a page refresh does not lose the progress.

**POST`/intentic` Run an infrastructure command stream**

Runs the sandbox's own command-line tool and streams its output as it arrives, so progress is visible rather than arriving all at once at the end. A failure surfaces once the stream closes.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `args` required | string[] | body |

### What comes back

| Field | Type |
| --- | --- |
| `when event is "message"` | shape |
| `data` | object |
| `kind` | string |
| `id` | string |
| `retry` | number |
| `when event is "done"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |
| `when event is "error"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |

Try it answered in this tab

curl

```bash
curl -N -X POST "$SANDBOX/intentic" \
 -H "x-intentic-control: $INTENTIC_TOKEN" \
 -H "content-type: application/json" \
 -d '{"args":["…","…"]}'
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.intentic.run({
 "args": [
 "…",
 "…"
 ]
});
```

**POST`/intentic/apply` Bring the infrastructure into line**

Starts the long reconcile that makes the running world match what was declared, and answers immediately. It takes minutes, so it runs in a terminal you attach to rather than on a held-open request.

### What you send

Nothing. Call it as it is.

### What comes back

| Field | Type |
| --- | --- |
| `ok` Always true | true |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/intentic/apply" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.intentic.apply();
```

**GET`/intentic/apply/events` Follow the reconcile stream**

The same progress the terminal shows, as structured events, kept on disk so a page refresh does not lose it. It replays from the start of the run and then follows live, closing when the run ends.

### What you send

Nothing. Call it as it is.

### What comes back

| Field | Type |
| --- | --- |
| `when event is "message"` | shape |
| `data` | object |
| `kind` | string |
| `id` | string |
| `retry` | number |
| `when event is "done"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |
| `when event is "error"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |

Try it answered in this tab

curl

```bash
curl -N "$SANDBOX/intentic/apply/events" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.intentic.applyEvents();
```

More in Connected systems

[Previous ← Inventory](https://intentic.dev/api/inventory/)
