# Commands

> Reference for the traces CLI commands you use with adTraces.

Run `traces` with no arguments to open the terminal UI.

| Command | What it does |
| --- | --- |
| `traces login`, `traces logout`, `traces whoami` | Sign in, clear credentials, show the current user |
| `traces namespace list` | List your namespaces |
| `traces namespace use <slug>` | Switch the active namespace |
| `traces namespace pin [slug]`, `traces namespace unpin` | Pin a namespace to the current directory |
| `traces list` | List local traces without the TUI |
| `traces search <pattern>` | Search local trace metadata and events |
| `traces show <id>` | Show metadata or a bounded range of events |
| `traces sync <id>` | Download a remote trace into the local database |
| `traces share` | Upload a session |
| `traces refresh --trace-id <id>` | Upload new events to an already shared trace |
| `traces transfer <id> --to <slug>` | Move a trace to another namespace |
| `traces setup` | Install agent skills, hooks and git hooks |
| `traces doctor`, `traces status` | Check installation, credentials and connectivity |
| `traces upgrade`, `traces uninstall`, `traces reset` | Maintenance |

## Sharing

```bash
traces share --cwd .                 # latest session of this directory
traces share --cwd . --agent auto    # detect the agent
traces share --list                  # list local sessions
traces share --cwd . --json          # machine-readable result
```

The JSON result contains the shared URL under `data.sharedUrl`.

Which of these commands an adTraces server supports follows its `/v1` API, see the [API overview](/docs/api). Commands that only touch local data work as usual.
