Authentication

Log in to Traces via GitHub OAuth or API keys for programmatic access.

Authentication methods

MethodUse caseToken type
CLI device authInteractive CLI loginDevice token
GitHub OAuthWeb app loginSession cookie
API keyCI/CD, scripts, headless environmentstrk_ prefixed key

CLI login

traces login

Opens your browser for GitHub OAuth. The CLI stores a device token locally.

For environments without a browser (SSH, remote machines):

traces login --no-browser

Prints a URL you can open on any device.

Check status

traces whoami

Logout

traces logout

This revokes the server session and clears local credentials.

API keys

API keys provide scoped, programmatic access without interactive login. They're designed for CI/CD pipelines, scripts, and headless environments.

Creating API keys

  1. Go to traces.com/@your-namespace/settings/api-keys
  2. Click Create API Key
  3. Choose scopes and copy the key (starts with trk_)

Keys are only shown once at creation time.

Scopes

ScopePermissions
traces:writeCreate and update traces and messages
traces:readRead traces and messages
namespace:readRead namespace info and members

Using API keys with the CLI

Pass the key directly:

traces share --cwd . --key trk_your_api_key_here

Or set it as an environment variable:

export TRACES_API_KEY=trk_your_api_key_here
traces share --cwd .

Auth precedence

The CLI resolves authentication in this order:

  1. --key flag (explicit, always wins)
  2. Stored login from traces login
  3. TRACES_API_KEY environment variable

Key limits

  • Maximum 25 active keys per namespace
  • Keys are scoped to the namespace they were created in
  • Keys can be revoked at any time from settings

On this page