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

> ## Agent Instructions
> Reactor hosts multiple models, each with its own connect slug (modelName) and command/event schema. The catalog of every model — slug, typed SDK package, and links to its schema — is at /model-api-reference/overview. Some models expose one slug per experience (e.g. HappyOyster); always take the slug from the model's own pages, never guess it.
> Fastest path to a working app: `npx create-reactor-app my-app --model=<slug>` scaffolds a complete app with secure auth wired up. Typed TypeScript SDKs are published as @reactor-models/<model>; Python uses the base reactor-sdk package.
> Auth: exchange an API key (rk_...) for a JWT via POST https://api.reactor.inc/tokens from your server. Never put the API key in client-side code.
> Append .md to any docs URL for clean Markdown. Search these docs via the MCP server at https://docs.reactor.inc/mcp.

# reactor logs

> Stream logs for a session or model instance

```sh theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
reactor logs <id> [flags]
```

## Description

Stream logs from the Reactor log gateway.

The positional \<id> is auto-detected: a UUID is treated as a session\_id;
anything else is treated as a machine\_id (a model instance's name).

```sh theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
reactor logs 123e4567-e89b-12d3-a456-426614174000      # session logs
reactor logs helios-aa44-fqwe                          # model-instance logs
```

By default the command prints the historical window (last few minutes)
and then exits. Pass `-f` / `--follow` to keep tailing live until Ctrl+C.

**Combine with shell tools for filtering and slicing:**

```sh theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
reactor logs <id> | head -20      # last ~20 historical lines
reactor logs <id> -f | grep ERR   # follow + filter
```

When stdout is a terminal, structured runtime log lines (JSON) render
as a readable single-line format: date and time, LEVEL, message, then
the remaining fields as key=value pairs (a record's exc\_info traceback,
when present, prints on the lines below). Other lines print verbatim.
Piped or redirected output is always the raw line as received (so the
examples above and | jq pipelines keep working); pass `--raw` to force
that in a terminal too. Colours honour the NO\_COLOR convention.

Use `--since` / `--until` to request a specific historical window instead
of the gateway's default lookback. Each accepts an RFC3339 timestamp
or a duration meaning "that long ago":

```sh theme={"theme":{"light":"github-light","dark":"github-dark-high-contrast"}}
reactor logs <id> --since 2h              # from 2h ago to now
reactor logs <id> --since 3d              # from 3 days ago to now
reactor logs <id> --since 2h --until 30m  # a bounded historical slice
```

## Options

| Flag             | Description                                                                                                                          |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `-f, --follow`   | keep tailing live after the historical window has been printed                                                                       |
| `--raw`          | print log lines exactly as received (default when stdout is not a terminal)                                                          |
| `--since string` | start of the historical window: RFC3339 timestamp or duration ago (e.g. "2h", "3d")                                                  |
| `--until string` | end of the historical window: RFC3339 timestamp or duration ago (e.g. "30m", "3d"); requires `--since`, incompatible with `--follow` |

## Global options

| Flag              | Description                                                                           |
| ----------------- | ------------------------------------------------------------------------------------- |
| `--server string` | Reactor API server URL (default "[https://api.reactor.inc](https://api.reactor.inc)") |
| `-v, --verbose`   | Enable verbose output                                                                 |

## See also

* [reactor](/deploy/cli-reference/reactor) - The CLI for the Reactor platform
