# chat

> A chat session, the same as Nexus UI's home: the answer streams; a prompt continues the session you used last.

A chat session, the same as Nexus UI's home: the answer streams; a prompt continues the session you used last.

## nexus chat sessions

```sh
nexus chat sessions [list] [--all] [--search words] [--limit N]
```

Your chat sessions, most recent first (--all: archived ones too).

| Option | Meaning |
| --- | --- |
| `--all` | The whole catalog, coming-soon models included |
| `--search <words>` | Only sessions with these words in the title or messages |
| `--limit <N>` | At most this many (1 to 100) |

```sh
nexus chat sessions images chs_… --out shots
```

## nexus chat sessions show

```sh
nexus chat sessions show <id>
```

A session's messages, with the model, cost and sources of each answer.

## nexus chat sessions images

```sh
nexus chat sessions images <id> [<image>…] [--out dir] [--force]
```

Save a session's images to files: every question's, or the ones named by id.

| Option | Meaning |
| --- | --- |
| `--out <dir>` | The directory to save the images in (default: the working directory; made if it is missing) |
| `--force` | Overwrite files that are already there |

```sh
nexus chat sessions images chs_… --out shots
```

## nexus chat sessions rename

```sh
nexus chat sessions rename <id> <title…>
```

Give a session a title.

## nexus chat sessions archive

```sh
nexus chat sessions archive <id> [--undo]
```

Hide a session from the list (--undo brings it back).

| Option | Meaning |
| --- | --- |
| `--undo` | Undo it: restore an archived session |

## nexus chat sessions delete

```sh
nexus chat sessions delete <id>
```

Delete a session and its messages.

## nexus chat share

```sh
nexus chat share <session> [--org | --team T | --people a@x,b@y] [--replace] [--allow-continue]
nexus chat share <session> --to a@x,b@y | --public [--expires 30d] [--include-code]
nexus chat share <session> --private
```

Share a session as an artifact: a snapshot for your organization, chosen teams or chosen people (again: a new version; --replace revokes the earlier ones).

- `nexus chat share <session> --to a@x,b@y | --public [--expires 30d] [--include-code]`: Share it outside your organization, as its settings allow: with named people by email (they sign in with that email to open it) or anyone with the link.
- `nexus chat share <session> --private`: Stop sharing a session: revoke every version, so only you can read it.

| Option | Meaning |
| --- | --- |
| `--org` | Share with everyone in your organization |
| `--team <T>` | Share with these teams (slugs, comma-separated) and the teams under them |
| `--people <a@x,b@y>` | Share with these people in your organization (emails, comma-separated) |
| `--replace` | Revoke the session's earlier versions, so only this audience can open it |
| `--allow-continue` | Let readers continue it in a new private chat of their own |
| `--to <a@x,b@y>` | Share outside your organization with these people (emails, comma-separated); they sign in with that email to open it |
| `--public` | Share with anyone who has the link (unguessable, not indexed by search engines) |
| `--expires <30d>` | When a public link stops working: 30d, 12h or a number of days |
| `--include-code` | Keep an old code session's sources in a share outside your organization (only if your organization allows it) |
| `--private` | Stop sharing: revoke every version, so only you can read it |

## nexus chat export

```sh
nexus chat export <session> [--md] [--out file]
```

A session as Markdown, to stdout or a file.

| Option | Meaning |
| --- | --- |
| `--md` | As Markdown (the only format for now) |
| `--out <file>` | Write it to this file instead of stdout |
