# Sharing via CLI

> Share and refresh a session with the traces CLI.

After [signing in](/docs/getting-started/authentication):

```bash
traces share --cwd "$PWD"       # latest session of the current directory
traces share --list             # sessions the CLI can see
traces share --cwd . --agent claude-code
```

The CLI uploads trace metadata first and then the messages in batches. Running it again on the same session is safe: uploads are upserts keyed by the external trace ID.

## Add new events later

```bash
traces refresh --trace-id <id>
```

## Move a trace

```bash
traces namespace list
traces transfer <id> --to <slug>
```

The target namespace must be one you belong to.

## Visibility

New traces use the default visibility of the active namespace, which is private unless an admin changed it. Change a single trace on its page or via `PATCH /v1/traces/{externalId}`, see [Visibility](/docs/sharing/visibility).
