TokenTelemetry
TokenTelemetry Docs
Reference

CLI & Environment Reference

Complete table of every CLI subcommand, flag and environment variable that TokenTelemetry recognizes.

This is the authoritative reference for the TokenTelemetry launcher CLI and every environment variable the launcher and backend recognize. If you installed via the one-line installer, a tokentelemetry shim is written to ~/.local/bin (macOS/Linux) or %USERPROFILE%\.local\bin (Windows), so the command resolves from any directory. If you cloned the repo instead, run ./start.sh (or node bin/cli.js) from inside the tokentelemetry/ folder.

Usage

tokentelemetry [command] [options]     # from anywhere (after the installer)
./start.sh [options]                   # macOS / Linux, from the repo folder
node bin/cli.js [options]              # cross-platform, from the repo folder

Subcommands

The first argument is a command only when it matches a known verb; anything else falls through to dashboard flag parsing, so tokentelemetry --port 4000 keeps working exactly as before.

CommandDescription
dashboardStart the dashboard. The default when no command is given.
menubarStart the menu bar / system tray panel.
desktopLaunch the desktop app.
statusDashboard status. Not implemented yet.
stopStop the dashboard. Not implemented yet.

menubar vs desktop: both start the same app. menubar runs it tray-only, so you get the panel with no dashboard window and, on macOS, no dock icon. Its "Open dashboard" item creates the window on first use. desktop opens the window up front and adds the tray alongside it.

CLI flags

FlagShortDefaultDescription
--port <N>-p3000Frontend (Next.js) port
--api-port <N>-a8000Backend (FastAPI) port
--data-dir <path>-d~/.tokentelemetryWhere TokenTelemetry stores config and state. Sets TOKENTELEMETRY_DATA_DIR.
--host <addr>127.0.0.1Backend bind address. Use 0.0.0.0 (or a specific IP) to expose remotely.
--allowed-origins <list>(empty)Comma-separated hosts allowed to load the dashboard from another machine (CORS + Next.js dev origins).
--auth-token <token>(auto-generated)Access token required for remote requests. If --host is non-loopback and this is omitted, a random token is generated and printed once.
--insecure-no-authfalseDisable the remote access token entirely. Only safe on a fully trusted private network.
--help-hPrint help and exit.

Flag examples

# Default: frontend on 3000, backend on 8000, localhost only
./start.sh

# Custom ports
./start.sh --port 4000 --api-port 9000

# Frontend on 4000, backend stays 8000
./start.sh -p 4000

# Expose on a tailnet/LAN with auto-generated token
./start.sh --host 0.0.0.0 \
  --allowed-origins box.tailnet.ts.net,100.64.0.1

# Expose with a fixed token
./start.sh --host 0.0.0.0 --auth-token my-secret

# Store config and state on a secondary drive
./start.sh --data-dir /mnt/d/tt-data

Environment variables

Launcher (Node.js / bin/cli.js)

VariableDescription
TOKENTELEMETRY_DATA_DIRSets the data directory (used verbatim, no .tokentelemetry suffix). --data-dir flag wins.
TT_AUTH_TOKENAccess token for remote requests. --auth-token flag wins.
AGENT_HARNESS_NO_OPENSet to any non-empty value to skip auto-opening the browser on startup.
TT_NO_UVSet to 1 to bootstrap the backend venv with python -m venv and pip even when uv is on PATH.
NEXT_PUBLIC_API_PORTPassed to the Next.js dev server to tell the frontend which port the backend is on. Set automatically by the launcher from --api-port.
NEXT_PUBLIC_API_BASEFull backend URL override (e.g. http://localhost:8000). Overrides the runtime auto-detection from window.location. Useful in SSH-tunnel setups.

Backend (Python / FastAPI)

VariableDescription
TOKENTELEMETRY_DATA_DIRData directory, used verbatim. Highest precedence.
TOKENTELEMETRY_HOMEOverride of the home directory; .tokentelemetry is appended as a subfolder. Lower precedence than TOKENTELEMETRY_DATA_DIR.
TT_AUTH_TOKENAccess token for the remote-auth gate. Empty string = no token required (set by the launcher when --insecure-no-auth is used).
TT_ALLOWED_ORIGINSComma-separated CORS allowlist. Set by the launcher from --allowed-origins.
TT_REMOTE_CONNECT_URLFull URL (with token) printed for the QR code. Set by the launcher.
TT_NO_UPDATE_CHECKSet to 1 to disable the hourly update check entirely. Wins over the in-app toggle.
TT_NO_TELEMETRYSet to 1 to disable anonymous product telemetry. Wins over the in-app toggle.
DO_NOT_TRACKSet to 1 to disable product telemetry (same effect as TT_NO_TELEMETRY).
TT_PROJECT_ROOTSComma-separated list of additional directories to scan for agent sessions (beyond the default ~/.claude/, ~/.codex/, etc.).
TT_API_PORTBackend port, as an alternative to --api-port.
TT_HOSTBackend bind address, as an alternative to --host.
HERMES_HOMEPath to the Hermes Agent data directory. Default: ~/.hermes/.
TT_MUSE_SESSIONS_DIRPath to Muse Code's session directory. Default: ${XDG_DATA_HOME:-~/.local/share}/muse/sessions/. Useful for a mounted or relocated agent data directory.
TT_PRIME_SESSIONS_DIRPath to Prime Agent's session directory. Default: ~/.prime/agent/sessions/. Useful for a mounted or relocated agent data directory.
PRIME_AGENT_SESSION_DIRPrime Agent's own session-directory override. TokenTelemetry honors it when TT_PRIME_SESSIONS_DIR is not set.
DSH_HOMEDeepSeek Harness' own home-directory override. Default: ~/.dsh/; TokenTelemetry reads sessions from <DSH_HOME>/sessions/.
QODER_HOMEPath to Qoder's data directory. Default: ~/.qoder/; sessions are read from <QODER_HOME>/projects/. Qoder itself has no relocation variable, so this is a TokenTelemetry-side override for a mounted or relocated directory.
QODER_IDE_HOMEPath to the Qoder desktop app's data directory. Default: ~/Library/Application Support/com.qoder.app.stable on macOS. Read only for session titles and the disk footprint; sessions always come from the transcripts.
ZCODE_DATA_DIRPath to ZCode's data directory (the .zcode root). Default: ~/.zcode/; sessions are read from <ZCODE_DATA_DIR>/cli/db/db.sqlite.
KIMI_HOMEPath to Kimi Code's data directory. Default: ~/.kimi/; sessions are read from <KIMI_HOME>/sessions/. This is a TokenTelemetry-side override for a mounted or relocated directory.

Summarizer backends

VariableBackendDescription
TT_OLLAMA_TIMEOUTOllamaRequest timeout in seconds. Default: 360.
TT_CODEX_TIMEOUTCodexRequest timeout in seconds. Default: 300.
TT_OPENAI_COMPAT_TIMEOUTOpenAI-compatibleRequest timeout in seconds. Default: 120.
OPENAI_COMPAT_API_KEYOpenAI-compatibleBearer token for the OpenAI-compatible endpoint. Wins over the value stored in summarizer.json.
OPENAI_COMPAT_USER_AGENTOpenAI-compatibleHTTP User-Agent header. Default: TokenTelemetry/1.0 (+https://github.com/VasiHemanth/tokentelemetry).

On this page