<!-- https://tinyactors.dev/cli/commands/actors/ -->
# tinyactors actors

Kind: reference. For: [Workflow developer who tests](https://tinyactors.dev/audiences/workflow-tester.xml), [Agent-platform engineer](https://tinyactors.dev/audiences/agent-platform.xml).
Voice: [Reference](https://tinyactors.dev/voices/reference.xml).

> List every actor of a snapshot with its state and queues.

List every actor of a snapshot with its state and queues.

<a id="usage"></a>

## Usage

```shell
tinyactors actors [options] SNAPSHOT
```

Restores the snapshot in memory, without its datamodels, and runs nothing. Lists each actor of each live segment: its session, name, chart, segment and state. Lists its parent, its running invocations and its configuration, the active states in document order. A hibernated actor's configuration is in its blob. Lists the events queued in its mailbox and its pending delayed sends with when they are due. `--chart`, `--segment` and `--session` narrow the list.

<a id="options"></a>

## Options

- **`-W, --warnings-as-errors`**: Refuse a chart that compiles with a warning.
- **`-I, --include DIR`**: Search `DIR` for a src that is not beside the file naming it, in the order given. Repeatable.
- **`-c, --chart NAME`**: Look at the chart named `NAME` only. Repeatable.
- **`-s, --segment N`**: List the actors of segment N only. Default: every live segment.
- **`--session ID`**: Look at session ID only. Repeatable.

Configure output formats like `-f json` using the [shared options on the command reference](https://tinyactors.dev/cli/commands/index.md#program-options).

<a id="examples"></a>

## Examples

```shell
tinyactors actors shop.snapshot
```

```text title="output"
# Actors

- **Snapshot**: shop.snapshot
- **System ID**: shop
- **Time**: 10000

## Actors

### Actor 1: order-3

- **Session**: 3
- **Name**: order-3
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- paid

#### Mailbox

_none_

#### Delayed

_none_

### Actor 2: order-4

- **Session**: 4
- **Name**: order-4
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- paid

#### Mailbox

_none_

#### Delayed

_none_

### Actor 3: order-5

- **Session**: 5
- **Name**: order-5
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- paid

#### Mailbox

_none_

#### Delayed

_none_

### Actor 4: order-6

- **Session**: 6
- **Name**: order-6
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- paying

#### Mailbox

_none_

#### Delayed

| Event | Sendid | Due | In |
| --- | --- | --- | --- |
| payment.timeout | deadline | 30000 | 20s |

### Actor 5: order-7

- **Session**: 7
- **Name**: order-7
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- paying

#### Mailbox

_none_

#### Delayed

| Event | Sendid | Due | In |
| --- | --- | --- | --- |
| payment.timeout | deadline | 30000 | 20s |

### Actor 6: order-8

- **Session**: 8
- **Name**: order-8
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- paying

#### Mailbox

_none_

#### Delayed

| Event | Sendid | Due | In |
| --- | --- | --- | --- |
| payment.timeout | deadline | 30000 | 20s |

### Actor 7: order-9

- **Session**: 9
- **Name**: order-9
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- paying

#### Mailbox

_none_

#### Delayed

| Event | Sendid | Due | In |
| --- | --- | --- | --- |
| payment.timeout | deadline | 30000 | 20s |

### Actor 8: order-10

- **Session**: 10
- **Name**: order-10
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- paying

#### Mailbox

_none_

#### Delayed

| Event | Sendid | Due | In |
| --- | --- | --- | --- |
| payment.timeout | deadline | 30000 | 20s |

### Actor 9: order-11

- **Session**: 11
- **Name**: order-11
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- open

#### Mailbox

_none_

#### Delayed

_none_

### Actor 10: order-12

- **Session**: 12
- **Name**: order-12
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- open

#### Mailbox

_none_

#### Delayed

_none_

### Actor 11: order-13

- **Session**: 13
- **Name**: order-13
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- open

#### Mailbox

_none_

#### Delayed

_none_

### Actor 12: order-14

- **Session**: 14
- **Name**: order-14
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- open

#### Mailbox

_none_

#### Delayed

_none_

### Actor 13: order-15

- **Session**: 15
- **Name**: order-15
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- open

#### Mailbox

_none_

#### Delayed

_none_

### Actor 14: order-16

- **Session**: 16
- **Name**: order-16
- **Chart**: order
- **Segment**: 0
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- open

#### Mailbox

_none_

#### Delayed

_none_

### Actor 15: order-17

- **Session**: 17
- **Name**: order-17
- **Chart**: order
- **Segment**: 0
- **State**: hibernated
- **Invocations**: 0
- **Queued**: 0
- **Note**: hibernated: its configuration and datamodel are in its blob, in the host's store (tinyactors inspect BLOB SNAPSHOT reads it)

#### Configuration

_none_

#### Mailbox

_none_

#### Delayed

_none_

### Actor 16: order-21

- **Session**: 4294967297
- **Name**: order-21
- **Chart**: order
- **Segment**: 1
- **State**: idle
- **Invocations**: 0
- **Queued**: 0

#### Configuration

- open

#### Mailbox

_none_

#### Delayed

_none_
```

List every actor of a snapshot.

```shell
tinyactors actors --chart order --session 17 shop.snapshot
```

```text title="output"
# Actors

- **Snapshot**: shop.snapshot
- **System ID**: shop
- **Time**: 10000

## Actors

### Actor 1: order-17

- **Session**: 17
- **Name**: order-17
- **Chart**: order
- **Segment**: 0
- **State**: hibernated
- **Invocations**: 0
- **Queued**: 0
- **Note**: hibernated: its configuration and datamodel are in its blob, in the host's store (tinyactors inspect BLOB SNAPSHOT reads it)

#### Configuration

_none_

#### Mailbox

_none_

#### Delayed

_none_
```

Show session 17 if it runs the order chart.

```shell
tinyactors actors -f json shop.snapshot
```

```text title="output"
{
  "snapshot": "shop.snapshot",
  "systemID": "shop",
  "time": 10000,
  "actors": [
    {
      "session": 3,
      "name": "order-3",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "paid"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 4,
      "name": "order-4",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "paid"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 5,
      "name": "order-5",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "paid"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 6,
      "name": "order-6",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "paying"
      ],
      "mailbox": [],
      "delayed": [
        {
          "event": "payment.timeout",
          "sendid": "deadline",
          "due": 30000,
          "in": "20s"
        }
      ]
    },
    {
      "session": 7,
      "name": "order-7",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "paying"
      ],
      "mailbox": [],
      "delayed": [
        {
          "event": "payment.timeout",
          "sendid": "deadline",
          "due": 30000,
          "in": "20s"
        }
      ]
    },
    {
      "session": 8,
      "name": "order-8",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "paying"
      ],
      "mailbox": [],
      "delayed": [
        {
          "event": "payment.timeout",
          "sendid": "deadline",
          "due": 30000,
          "in": "20s"
        }
      ]
    },
    {
      "session": 9,
      "name": "order-9",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "paying"
      ],
      "mailbox": [],
      "delayed": [
        {
          "event": "payment.timeout",
          "sendid": "deadline",
          "due": 30000,
          "in": "20s"
        }
      ]
    },
    {
      "session": 10,
      "name": "order-10",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "paying"
      ],
      "mailbox": [],
      "delayed": [
        {
          "event": "payment.timeout",
          "sendid": "deadline",
          "due": 30000,
          "in": "20s"
        }
      ]
    },
    {
      "session": 11,
      "name": "order-11",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "open"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 12,
      "name": "order-12",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "open"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 13,
      "name": "order-13",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "open"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 14,
      "name": "order-14",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "open"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 15,
      "name": "order-15",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "open"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 16,
      "name": "order-16",
      "chart": "order",
      "segment": 0,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "open"
      ],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 17,
      "name": "order-17",
      "chart": "order",
      "segment": 0,
      "state": "hibernated",
      "invocations": 0,
      "queued": 0,
      "note": "hibernated: its configuration and datamodel are in its blob, in the host's store (tinyactors inspect BLOB SNAPSHOT reads it)",
      "configuration": [],
      "mailbox": [],
      "delayed": []
    },
    {
      "session": 4294967297,
      "name": "order-21",
      "chart": "order",
      "segment": 1,
      "state": "idle",
      "invocations": 0,
      "queued": 0,
      "configuration": [
        "open"
      ],
      "mailbox": [],
      "delayed": []
    }
  ]
}
```

List every actor of a snapshot as JSON.

<a id="exit-status"></a>

## Exit status

- **`1`**: The snapshot cannot be restored: it is damaged or of another format.
- **`3`**: A file cannot be read or written, or memory runs out.

<a id="see"></a>

## Related pages

- [Offline snapshots](https://tinyactors.dev/cli/guides/snapshots/index.md)
- **[`tinyactors inspect`](https://tinyactors.dev/cli/commands/inspect/index.md)**: Show what an image, a snapshot or a blob holds.

## Commands

- [tinyactors compile](https://tinyactors.dev/cli/commands/compile/)
- [tinyactors check](https://tinyactors.dev/cli/commands/check/)
- [tinyactors inspect](https://tinyactors.dev/cli/commands/inspect/)
- [tinyactors states](https://tinyactors.dev/cli/commands/states/)
- [tinyactors transitions](https://tinyactors.dev/cli/commands/transitions/)
- [tinyactors events](https://tinyactors.dev/cli/commands/events/)
- [tinyactors data](https://tinyactors.dev/cli/commands/data/)
- [tinyactors expressions](https://tinyactors.dev/cli/commands/expressions/)
- [tinyactors disassemble](https://tinyactors.dev/cli/commands/disassemble/)
- [tinyactors graph](https://tinyactors.dev/cli/commands/graph/)
- [tinyactors diff](https://tinyactors.dev/cli/commands/diff/)
- [tinyactors lint](https://tinyactors.dev/cli/commands/lint/)
- [tinyactors path](https://tinyactors.dev/cli/commands/path/)
- [tinyactors fmt](https://tinyactors.dev/cli/commands/fmt/)
- [tinyactors actors](https://tinyactors.dev/cli/commands/actors/)
- [tinyactors run](https://tinyactors.dev/cli/commands/run/)
- [tinyactors help](https://tinyactors.dev/cli/commands/help/)
- [tinyactors version](https://tinyactors.dev/cli/commands/version/)
