---
name: adtraces-get-started
description: Set up the traces CLI for this adTraces instance and share the current session.
---

# Get started with adTraces

Instance: https://adtraces.adfactory.app

## Steps

1. Check whether the CLI exists: `traces version`. If not, install it with `npm i -g @traces-sh/traces` or `brew install market-dot-dev/tap/traces` (or `curl -fsSL https://adtraces.adfactory.app/install | bash`).
2. Point the CLI at this instance. All three variables are required:

   ```bash
   export TRACES_HTTP_URL=https://adtraces.adfactory.app
   export TRACES_URL=https://adtraces.adfactory.app
   export TRACES_API_URL=https://adtraces.adfactory.app
   ```

   Hooks started by an agent only see the agent's environment. For Claude Code, put the same three variables under `env` in `~/.claude/settings.json`.
3. Sign in: run `traces whoami`; when it reports no login, run `traces login` and let the user approve in the browser. Never ask the user to paste a password. For unattended use the user can create an API key in `https://adtraces.adfactory.app/<namespace>/settings` and set `TRACES_API_KEY`.
4. Share the current session: `traces share --cwd . --agent auto`. New traces are private by default. Return the printed URL to the user.
5. Optional: `traces setup` installs skills and hooks so sessions are shared automatically, and `traces setup git` attaches trace IDs to commits.

## Rules

- Do not change the visibility of a trace to public unless the user asks.
- Do not store API keys in files that are committed.

## More

- Documentation: https://adtraces.adfactory.app/docs
- For language models: https://adtraces.adfactory.app/llms.txt
- API description: https://adtraces.adfactory.app/openapi.json
- MCP endpoint: https://adtraces.adfactory.app/mcp
