# Rooms presence subscribe
Use the `ably rooms presence subscribe` command to subscribe to presence events in a chat room.
## Synopsis
### Shell
```
ably rooms presence subscribe [options]
```
## Arguments
### `room-name` **(Required)**
The name of the chat room to subscribe to presence events in.
## Options
### `--duration | -D`
The duration in seconds to subscribe for before automatically unsubscribing.
### `--client-id`
A client ID to use for the subscription.
### `--json`
Output results as compact JSON. Mutually exclusive with `--pretty-json`.
### `--pretty-json`
Output results in formatted JSON. Mutually exclusive with `--json`.
### `--verbose | -v`
Enable verbose logging. Can be combined with `--json` or `--pretty-json`.
## Examples
Subscribe to presence events in a room:
### Shell
```
ably rooms presence subscribe my-room
```
Subscribe for a specific duration:
### Shell
```
ably rooms presence subscribe my-room --duration 120
```
Subscribe to room presence events in JSON format:
### Shell
```
ably rooms presence subscribe my-room --json
```
## See also
* [Rooms](https://ably.com/docs/cli/rooms.md) — Explore all `ably rooms` commands.
* [CLI reference](https://ably.com/docs/cli.md) — Full list of available commands.
## Related Topics
- [enter](https://ably.com/docs/cli/rooms/presence/enter.md): Enter presence in an Ably Chat room using the CLI.
- [get](https://ably.com/docs/cli/rooms/presence/get.md): Get current presence members in an Ably Chat room using the CLI.
## Documentation Index
To discover additional Ably documentation:
1. Fetch [llms.txt](https://ably.com/llms.txt) for the canonical list of available pages.
2. Identify relevant URLs from that index.
3. Fetch target pages as needed.
Avoid using assumed or outdated documentation paths.