# kosa8 cloud embed

Make a signed, expiring URL to show a sandbox's terminal or desktop in an iframe

## Usage

```
kosa8 cloud embed ID [-- COMMAND [ARG...]]
```

Prints a URL (and an <iframe> snippet) that shows the sandbox's terminal or
desktop on your own site, until --ttl or a revoke. Only the --origin sites may
frame it. --mode view watches only (keys and mouse are dropped); interact lets
the viewer type. A view terminal attaches read-only to the sandbox's tmux
session; give a COMMAND after -- to show another program instead.

The page posts ready, exited, approval_requested, expired and error events to
the parent window. kosa8 cloud embed ls ID lists the live ones; embed rm revokes.

## Flags

| Flag | Type | What it does | Default |
|---|---|---|---|
| `--mode` | string | view (watch only) or interact (keyboard and mouse too) | `view` |
| `--origin` | stringArray | a site that may frame it, scheme://host[:port] (repeatable, up to 10) | `[]` |
| `--ttl` | duration | how long the URL works, 1m to 7 days (default 1h) | `0s` |
| `--ui` | string | terminal or desktop (noVNC, for desktop images) | `terminal` |

## Example

```
  kosa8 cloud embed sbx_abc --origin https://app.example.com
  kosa8 cloud embed sbx_abc --mode interact --ttl 2h --origin https://learn.example.com
  kosa8 cloud embed sbx_abc --ui desktop --origin http://localhost:3000
  kosa8 cloud embed ls sbx_abc
  kosa8 cloud embed rm sbx_abc emb_0123abcd
```

## Subcommands

- [`kosa8 cloud embed ls`](https://docs.kosa8.com/reference/cloud-embed-ls.md): List a sandbox's live embeds (without their URLs)
- [`kosa8 cloud embed rm`](https://docs.kosa8.com/reference/cloud-embed-rm.md): Revoke an embed: its URL stops working

---
Source: https://docs.kosa8.com/reference/cloud-embed/
