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

# Fence

> Set a fencing token with the S2 CLI so cooperating writers can avoid conflicting appends.

Set a fencing token for cooperative write exclusion:

```bash theme={null}
s2 fence s2://my-basin/my-stream "writer-1"
```

Subsequent appends that specify a token will be rejected if it doesn't match:

```bash theme={null}
s2 append s2://my-basin/my-stream -f "writer-1"
```
